daily pastebin goal
5%
SHARE
TWEET

Untitled

a guest Jan 19th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Medication-MedicationID, BrandName, GenericName
  2.    
  3. select max(GenericCount)
  4. from
  5. (
  6.     select count(*) GenericCount, GenericName
  7.     from yourtable
  8.     group by GenericName
  9. ) x
  10.    
  11. select count(*) GenericCount, GenericName
  12.     from yourtable
  13.     group by GenericName
  14.    
  15. SELECT MAX(COUNT(GenericName)), GenericName FROM MedicationTable GROUP BY GenericName
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top