Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.45 KB | None | 0 0
  1. URLID   HOSTID
  2. 1   1
  3. 2   1
  4. 2   1
  5. 2   1
  6. 3   1
  7. 3   1
  8. 4   1
  9. 5   1
  10. 5   1
  11. 5   1
  12. 5   1
  13. 6   2
  14. 6   2
  15. 7   2
  16. 8   2
  17. 8   2
  18. 8   2
  19. 9   3
  20. 9   3
  21. 10  3
  22. 11  3
  23. 11  3
  24. 11  3
  25. 12  3
  26.  
  27. values returned should be
  28. HOSTID  URLID   COUNT
  29. 1   5   11
  30. 3   11  7
  31. 2   8   6
  32.  
  33. Explination:
  34. HOSTID=1 is most common HOSTID. 5 is the most common URLID with HOSTID=1, and there are 11 total HOSTID=1's
  35. HOSTID=3 is second most common HOSTID. 11 is the most common URLID with HOSTID=3, and there are 7 total HOSTID=3's
  36. so on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement