Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.21 KB | None | 0 0
  1. create view test as
  2. select DIAGNOSIS_CODE_1, count(DIAGNOSIS_CODE_1) as r1, STAY_INDICATOR
  3. from 6339_dataset_1
  4. where STAY_INDICATOR='L'
  5. group by DIAGNOSIS_CODE_1;
  6.  
  7. select DIAGNOSIS_CODE_1, max(r1) from test;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement