MySQL Database Tutorial – 19 – GROUP BY




Facebook – https://www.facebook.com/TheNewBoston-464114846956315/ GitHub – https://github.com/buckyroberts Google+ …

Original source


34 responses to “MySQL Database Tutorial – 19 – GROUP BY”

  1. Why did you feel the need to mention/tell us that you had phlegm in your throat? You are a low life, disgusting piece of dog shit! You should do the world a favor and go jump off of a fucking bridge head first, you dirt bag! You're one sorry motherfucker, you worthless sack of shit!

  2. This query work good (SELECT EmployeeName, COUNT( * ) AS item_count
    FROM coder
    GROUP BY EmployeeName) in sql section and this is showed me require result in sql but when i implement it that it is show me just one name that is good but that time the number of record of same name appear just once and other record is not appear. now i want to know how i can saw other result which it is showed me in sql and not fetched in website please.

  3. sir in short words one user A have a ten records in ten rows and when i will fetch it dynamically i want to show just name of user A and ten record under to this when user A upload new data this will come to under the name of A and same like other user two

  4. Hi thenewboston sir please help me this is my problem i have a two section of my website number#1 where one user name A register and fill form and upload data to my website and in section two the other user can view of uploaded data by User A and next user become register to my website and upload data in section one and other user can view this data too in section two. In section two all data fetched dynamically form database. After few days user A login and upload another data on website in section one.Now what i want to show in section two if user name will be same the data will go to the under of name A if user is different then data goes to another row.i develop system but problem is every time the new row append with same name in section two. please any one can give me some good suggestions thanks

  5. It's because you're using 'seller_id' in the GROUP BY clause (or the WHERE if you're just doing it for just one seller) so the stuff it is counting is how many times the user appears, which is equal to how many items the user is selling.
    — Try removing the COUNT clause to see what happens without it:
    SELECT seller_id FROM items WHERE seller_id=1;
    — Then add COUNT back in to see what exactly it is doing.
    SELECT seller_id, COUNT(*) AS item_count FROM items WHERE seller_id=1;
    Hope that helps.

Leave a Reply