select <name>, count(*) from <table> group by <name>;

        ----------
        From:  Tam McLaughlin [SMTP:[EMAIL PROTECTED]]
        Sent:  28 January 2003 15:16
        To:  [EMAIL PROTECTED]
        Subject:  [Scottish] sql

        i am trying something in mysql but can't remember any sql.
        Say i have a field called name in table 1 and i want to select the
        name and the number of times that name appears in the table,
        how would i do it?
        If u can tell me, i can find the equiv syntax in mysql
        thanks.
        -- 
        --------------------------------------------
        Tam McLaughlin
        IT Systems Administrator
        Scottish Legal Life Assurance Society Ltd


        _______________________________________________
        Scottish mailing list
        [EMAIL PROTECTED]
        http://mailman.lug.org.uk/mailman/listinfo/scottish
***********************************************************************************
This email and any accompanying files are confidential.      If you are
not  the  intended recipient  you  must not use,  copy or disclose the
content.   If you have received this email in error please contact the 
sender by return email and delete this message. 
Thankyou for your co-operation.
*************************************************************************************

_______________________________________________
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish

Reply via email to