www.webdeveloper.com
Results 1 to 4 of 4

Thread: SQL Query HELP

Hybrid View

  1. #1
    Join Date
    Jan 2011
    Posts
    42

    SQL Query HELP

    I have the following databse
    Event Date_Start
    BWM 2012-11-08
    BWM 2012-11-08
    BWM 2012-11-08
    BWM 2012-11-08
    BWM 2012-11-08
    Lucent_LTE 2012-11-08
    Lucent_LTE 2012-11-09
    BWM 2012-11-09
    BWM 2012-11-09
    BWM 2012-11-09
    BWM 2012-11-10
    BWM 2012-11-10
    BWM 2012-11-10
    BWM 2012-11-10
    BWM 2012-11-10
    BWM 2012-11-12
    BWM 2012-11-12
    BWM 2012-11-12

    I need to count how many are in each day. SO it needs to look like this
    2012-11-08 BWM 5 Lucent_LTE 1
    2012-11-09 BWM 3 Lucent_LTE 1
    2012-11-10 BWM 5
    2012-11-12 BWM 3

  2. #2
    Join Date
    Sep 2011
    Posts
    59
    THAT SQL WILL GIVE WHAT YOU NEED. IN MY CASE YOUR DATA IN #T TABLE

    select distinct Event,Date_Start,
    COUNT(Event) as evtNum
    from #T
    group by Event,Date_Start

  3. #3
    Join Date
    Jan 2011
    Posts
    42

    Resolved

    Thank you it worked

  4. #4
    Join Date
    Jan 2011
    Posts
    42

    resolved

    this worked thank you

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles