Results 1 to 4 of 4

Thread: please tell me

  1. #1
    Join Date
    Jun 2010

    Unanswered: please tell me

    please tell me how to i make a sql query for
    selecting data's from a table where that data repeated 4 times in that column

  2. #2
    Join Date
    Dec 2007
    Richmond, VA
    Provided Answers: 6
    how about a bit more info? Your question is rather vague. Try showing what data you have and what you would like to see as output.

  3. #3
    Join Date
    Jun 2010
    i have a table named department and the columns are dep_id dep_name ...etc

    i want to select datas from field(coulmn) where which is repeated 4 times or more

    for eg: if department ids (dep_id) are mech,computer,civil

    and if in column dep_id mech data repeated 6 times
    and in column dep_id data computer repeated 2 times
    and in column dep_id data civil repeated 3 times

    i want a sql query to select data mech from the column dep_id (bcz the data mech repeated 6 times ie more than 4)

  4. #4
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    SELECT dep_id
       FROM t
       GROUP BY dep_id
       HAVING 4 <= Count(*);
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts