This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL query needed

 
Nagendra Shastry
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am a student on Computer Science and not having much knowledge. So please don't mind if my quesrion is silly.
I need to write a sql query to group by a column where column has duplicate values( having count more than one)
Please help me out.
 
T Mishra
Ranch Hand
Posts: 108
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nagendra ,

It would be really helpful if you can tell us details about what you've tried so far and the problem you're facing.
 
Shashank Gollapudi
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nagendra,

As per what i have understood,

Let x be the column you wanted to find duplicates on,

use group by clause on x then followed by having clause using the count function

For example: Select x from sometable group by x having count(x) > 1
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic