human
Schema:
medicine (id, name, Trade_Name, FDA_approved)
enzyme (id, name, Location, Product, Chromosome, OMIM, Porphyria)
medicine_enzyme_interaction (enzyme_id, medicine_id, interaction_type)
Please answer with SQL.
assistant
Sure, I understand.
human
Show the interaction types in decreasing order of frequency.
assistant
SELECT interaction_type FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY COUNT( * ) DESC;
human
Show the counts, too.
assistant
SELECT interaction_type , COUNT( * ) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY COUNT( * ) DESC;
human
Only show the most frequent.
assistant
SELECT interaction_type , COUNT( * ) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY COUNT( * ) DESC LIMIT 1 ;