Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. regarding Group by

regarding Group by

Scheduled Pinned Locked Moved Database
question
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    praveenanand
    wrote on last edited by
    #1

    Hi, if we are trying to add the several columns in select statement without using Aggregate functions and only one condition in group by. how can we do that ??

    R C 2 Replies Last reply
    0
    • P praveenanand

      Hi, if we are trying to add the several columns in select statement without using Aggregate functions and only one condition in group by. how can we do that ??

      R Offline
      R Offline
      Rohde
      wrote on last edited by
      #2

      I'm not sure I understand you. Can you throw some SQL my way...


      "When you have made evil the means of survival, do not expect men to remain good. Do not expect them to stay moral and lose their lives for the purpose of becoming the fodder of the immoral. Do not expect them to produce, when production is punished and looting rewarded. Do not ask, `Who is destroying the world?' You are."
      -Atlas Shrugged, Ayn Rand

      1 Reply Last reply
      0
      • P praveenanand

        Hi, if we are trying to add the several columns in select statement without using Aggregate functions and only one condition in group by. how can we do that ??

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        praveenanand wrote:

        if we are trying to add the several columns in select statement without using Aggregate functions and only one condition in group by.

        You can't. Each column not specified in the GROUP BY clause must be part of an aggregate on the SELECT. If you think about what it is doing you will see why.


        Upcoming FREE developer events: * Developer Day Scotland My website | blog

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups