sql >> Database teknologi >  >> RDS >> Mysql

MySQL COUNT FORSKEL

 Select
     Count(Distinct user_id) As countUsers
   , Count(site_id) As countVisits
   , site_id As site
 From cp_visits
 Where ts >= DATE_SUB(NOW(), INTERVAL 1 DAY)
 Group By site_id


  1. Konverter minutter til HH24:MI-format

  2. Hvad er LENGTH() i MySQL?

  3. Sådan kontrolleres replikeringsfailover for MySQL og MariaDB

  4. Relationel algebra