Database: orchestra

Question: How many conductors are there?
SQL: SELECT count(*) FROM conductor

Question: List the names of conductors in ascending order of age.
SQL: SELECT Name FROM conductor ORDER BY Age ASC

Question: What are the names of conductors whose nationalities are not "USA"?
SQL: SELECT Name FROM conductor WHERE Nationality != 'USA'

Question: What are the record companies of orchestras in descending order of years in which they were founded?
SQL: SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC

Question: What is the average attendance of shows?
SQL: SELECT avg(Attendance) FROM SHOW

Question: What are the maximum and minimum share of performances whose type is not "Live final".
SQL: SELECT max(SHARE) ,  min(SHARE) FROM performance WHERE TYPE != "Live final"

Question: How many different nationalities do conductors have?
SQL: SELECT count(DISTINCT Nationality) FROM conductor

Question: List names of conductors in descending order of years of work.
SQL: SELECT Name FROM conductor ORDER BY Year_of_Work DESC

Question: List the name of the conductor with the most years of work.
SQL: SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1

Question: Show the names of conductors and the orchestras they have conducted.
SQL: SELECT T1.Name ,  T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID  =  T2.Conductor_ID

Question: Show the names of conductors that have conducted more than one orchestras.
SQL: SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID  =  T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*)  >  1

Question: Show the name of the conductor that has conducted the most number of orchestras.
SQL: SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID  =  T2.Conductor_ID GROUP BY T2.Conductor_ID ORDER BY COUNT(*) DESC LIMIT 1

Question: Please show the name of the conductor that has conducted orchestras founded after 2008.
SQL: SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID  =  T2.Conductor_ID WHERE Year_of_Founded  >  2008

Question: Please show the different record companies and the corresponding number of orchestras.
SQL: SELECT Record_Company ,  COUNT(*) FROM orchestra GROUP BY Record_Company

Question: Please show the record formats of orchestras in ascending order of count.
SQL: SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC

Question: List the record company shared by the most number of orchestras.
SQL: SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1

Question: List the names of orchestras that have no performance.
SQL: SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance)

Question: Show the record companies shared by orchestras founded before 2003 and after 2003.
SQL: SELECT Record_Company FROM orchestra WHERE Year_of_Founded  <  2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded  >  2003