A hospital has a patients table with columns city and patient_id. Administrators want to list cities with more than 100 patients. Which SQL should they use? SELECT city, COUNT(patient_id) FROM patients GROUP BY city HAVING COUNT(patient_id) > 100 SELECT city, COUNT(patient_id) FROM patients WHERE COUNT(patient_id) > 100 GROUP BY city SELECT city, patient_id FROM patients GROUP BY city HAVING patient_id > 100 SELECT city, COUNT(patient_id) FROM patients GROUP BY city WHERE COUNT(patient_id) > 100 Answer: SELECT city, COUNT(patient_id) FROM patients GROUP BY city HAVING COUNT(patient_id) > 100 Explanation: Aggregates like COUNT can only be filtered using HAVING. Using WHERE COUNT(…) is invalid. Filtering on patient_id > 100 incorrectly checks row-level values instead of group totals.
Blog
Students are allowed unlimited time to take this exam.
Students are allowed unlimited time to take this exam.
Which item is the predominant factor in protein stability?
Which item is the predominant factor in protein stability?
A newly isolated protein, is analyzed by SDS-polyacrylamide…
A newly isolated protein, is analyzed by SDS-polyacrylamide gel electrophoresis. After gel staining, the researcher obtains the figure below (DTT is dithiothreitol). Based on this gel, what could be the MW and structural arrangement of the native protein?
If you wanted to visualize the movement of individual microt…
If you wanted to visualize the movement of individual microtubules during the anaphase stage of mitosis, which microscopy technique would be the best choice?
Under the Russian tsar Nicholas II, Russification
Under the Russian tsar Nicholas II, Russification
A shipping company’s packages table includes a weight column…
A shipping company’s packages table includes a weight column. Management wants to know the lightest package shipped this year. Which query provides this? SELECT MIN(weight) FROM packages SELECT MAX(weight) FROM packages SELECT COUNT(weight) FROM packages SELECT AVG(weight) FROM packages Answer: SELECT MIN(weight) FROM packages Explanation: MIN retrieves the smallest value in the column, which is the lightest package. MAX gives the heaviest, COUNT gives the number of records, and AVG gives the average weight.
A student nurse prepares to administer oral medication to a…
A student nurse prepares to administer oral medication to a patient diagnosed with major depressive disorder. What should the student nurse do when the patient refuses the medication?
What action by a nurse constitutes a breach of a patient’s r…
What action by a nurse constitutes a breach of a patient’s right to privacy?
Which of the following is an SSRI?
Which of the following is an SSRI?