Sunday, 15 June 2014

mysql - SQL how to group -


I have a table as low as

  Barrier complaints Tim Slow John Waste Mike Dung Tim So Tim Charge Too Mike Lazy   

Make a table where the most complaints are ordered by the waiters, but the complaint also shows? Pre-Below

  Barrier Complaints Tim Slow Tim Sleep Tim Charges Too Mike Lazy Mike Dung John Rudd 
Post-text "itemprop =" text ">

Just count the number of complaints per waiters and join your table:

  select t1.waiter, t1.complaints table Select the waiter to join t1; (1) Calculate by the waiter as a table group by num_complaints (T1) = T. 2. At the T2. 2. NAM_complants day, T1witer, T1complants;    

No comments:

Post a Comment