Advertisement
festinko

Untitled

Oct 24th, 2022
1,052
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.37 KB | None | 0 0
  1. SELECT
  2.     userSMSRefill,
  3.     count(DISTINCT userID) usersCount
  4.  
  5. FROM
  6.     `uptimerobot-001.ur.users`
  7.  
  8. WHERE userID IN (
  9.  
  10.                 SELECT
  11.                  userID
  12.                 FROM
  13.                         `uptimerobot-001.ur.alertcontacts`
  14.                        
  15.                 WHERE
  16.                         alertContactType IN (8,14)
  17.                         AND alertContactStatus = 2
  18.                        
  19.                 GROUP BY
  20.                                 userID
  21.                 ORDER BY
  22.                         userID)
  23.  
  24. GROUP BY
  25.     userSMSRefill
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement