Nolan_'s Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
7 (0.01 per day)
Joined:
13-June 12
Profile Views:
679
Last Active:
User is offline Dec 06 2012 02:32 PM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   Nolan_ has not set their status

Posts I've Made

  1. In Topic: Select where replication < 5?

    Posted 15 Oct 2012

    View PostAtli, on 14 October 2012 - 07:15 PM, said:

    Hey.

    To do that you should use a GROUP BY ... HAVING clause, instead of DISTINCT. Something like:
    SELECT Piece_ID
    FROM PlayerGamePieces
    GROUP BY Piece_ID
    HAVING COUNT(Piece_ID) <= 2;
    
    

    The GROUP BY clause will ensure that only distinct values of the Piece_ID field appear in the result set. The HAVING clause acts as a WHERE clause, but with the ability to use aggregate functions to filter the set.



    Thanks!

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

Nolan_ hasn't added any friends yet.

Comments

Nolan_ has no profile comments yet. Why not say hello?