• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL query needed

 
Nagendra Shastry
Greenhorn
Posts: 19
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic