602.having distinct.mql 417 B

1234567891011
  1. SELECT room.affiliated_campus AS "affiliated_campus", room.affiliated_building AS "affiliated_building" INTO /t11031 FROM /hxyy/room room LIMIT 0, 20000
  2. SELECT t11031.affiliated_campus AS "院区", count(DISTINCT t11031.affiliated_building) AS "suspect_status" FROM /t11031 t11031 GROUP BY t11031."affiliated_campus" HAVING count(DISTINCT t11031."affiliated_building") > 100 LIMIT 0, 20000
  3. /**
  4. output()
  5. **/
  6. ;