1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Group By to Distinct

Discussion in 'Databases' started by afridy, Jan 15, 2014.

  1. #1
    Hello,
    SEMrush
    SELECT empno
         ,date
      FROM employees
    GROUP
        BY empno
         , LEFT(date,10)
    PHP:
    how do i write this query using DISTINCT?
     
    afridy, Jan 15, 2014 IP
    SEMrush
  2. Yassinoy

    Yassinoy Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    select distinct(empno) ...
     
    Yassinoy, Feb 5, 2014 IP
  3. Nitin.Mail

    Nitin.Mail Well-Known Member

    Messages:
    456
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    135
    #3
    SELECT distinct empno
         ,date
      FROM employees
    Code (markup):
     
    Nitin.Mail, Feb 9, 2014 IP