human
Schema:
building (building_id, Name, Street_address, Years_as_tallest, Height_feet, Floors)
Institution (Institution_id, Institution, Location, Founded, Type, Enrollment, Team, Primary_Conference, building_id)
protein (common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, Institution_id)
Please answer with SQL.
assistant
Sure, I understand.
human
How many buildings have height abouve average?
assistant
SELECT COUNT( * ) FROM building WHERE height_feet > ( SELECT AVG ( height_feet ) FROM building );
human
What about floors above average?
assistant
SELECT COUNT( * ) FROM building WHERE height_feet > ( SELECT AVG ( floors ) FROM building );
human
Give the union of the above.
assistant
SELECT COUNT( * ) FROM building WHERE height_feet > ( SELECT AVG ( height_feet ) FROM building ) OR floors > ( SELECT AVG ( floors ) FROM building ) ;