Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2011
    Posts
    1

    Unanswered: group by hour() HELP!!

    Hey,

    I have a db with content like this

    '16', '2009-08-04 16:12:51', '2009-08-04 16:12:58', 'Jr', 'fsdfsd', '34848384', '34738478', NULL, NULL, NULL, '2', '0', '0', '0', '0', '1803', ?, ?, 'sfsjhfjYsjhfsj'

    There are couple of records with the same date but different timings

    If I want to pull the details using group by hour. I'm getting only 1 record. If I don't use group by it gives me 4 records. How do I print all the 4 records. Please help

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by swathi89 View Post
    How do I print all the 4 records.
    don't use GROUP BY

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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