Advertisement
MiguelazoDS

Untitled

Jan 25th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.15 KB | None | 0 0
  1. SELECT ubicacion, COUNT(*) AS cantidad_ejemplares
  2. FROM mascotas
  3. WHERE estado='A'
  4. GROUP BY ubicacion
  5. HAVING COUNT(*) > 1
  6. ORDER BY COUNT(*) DESC, ubicacion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement