FAQ Database Discussion Community


Nested SQL statement with AVG()

php,mysql,select
I have three tables I want to pull data from. One is a classes table that stores a list of classes offered including an id, time stamp, trainer id, start time, am/pm and the days a class is held. The trainer id is a foreign key that ties it to...

Pandas DataFrame: Delete specific date in all leap years

python,select,pandas,leap-year
The following sequence is an extract of the pandas DataFrame that I've got: >>> df_t value 2011-01-31 -5.575000 2011-03-31 7.700000 2011-05-31 15.966667 2011-07-31 10.683333 2011-08-31 10.454167 2011-10-31 9.320833 2011-12-31 -0.358333 2012-01-31 -11.550000 2012-03-31 1.700000 2012-05-31 12.333333 2012-07-31 12.816667 2012-08-31 11.837500 2012-10-31 2.733333 2012-12-31 4.075000 2013-01-31 2.450000 2013-03-31 -4.262500 2013-05-31 11.491667...

QUERY IN C# ,where statement

c#,.net,select
How can I write this query on c# : SELECT DEPT_ID FROM PERSONNEL_TEMP.DEPARTMENT WHERE DEPARTMENT_NAME=combobox1.text; ...

how to Select data from multiple tables with several conditions?

sql,oracle,table,select
There are tables FACULTIES (F_NUMB, F_NAME, F_TELEF) and STUDENTS (S_NUM, SURNAME, SPECIALITY, GROUP, FACULTY_NUMB). Please write SQL query to achieve faculties names in which the count of students are greater than in faculty “Computer science”. This is what i'm doing: select faculties.f_name, count(STUDENTS.S_NUM) from STUDENTS, FACULTIES where students.fac_num=FACULTIES.F_NUMB group by...

SQL Select - Group by along with inner join?

sql-server,select,group-by,inner-join,distinct
I'm using the following query: SELECT TOP 12 INVENTABLE.ITEMNUMBER, INVENTABLE.ITEMNAME1, INVENTABLE.ITEMNAME2, INVENTABLE.W_TILBUD, INVENTABLE.COSTPRICE, INVENTABLE.VENDITEMNUMBER, INVENTABLE.A_PRODUCENT, INVENTABLE.GROUP_, INVENTABLE.A_GROSSISTLAGER, INVENTABLE.SupplementaryUnits FROM INVENTRANS INNER JOIN INVENTABLE ON INVENTABLE.ITEMNUMBER=INVENTRANS.ITEMNUMBER WHERE INVENTRANS.ACCOUNT='xxx' AND INVENTABLE.W_VISFORSIDE = 0 AND INVENTABLE.W_VISWWW = 1 AND INVENTABLE.BLOCKED = 0 ORDER BY INVENTRANS.ROWNUMBER DESC This query selects the 12...

Autoupdating Field Based on two