Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Group by or qnything else?

 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try to edit above but no luck... pasting remaining details


I am running a query which get data from multiple tables and condition with inner join. I want this query to group by a single column but when i do it i get: ORA-00979: not a GROUP BY expression, error message.
Well as per my understanding this is because of other table column which not support this group by.

This query I am writing to generate reports from jasper ireport tool. for example below column I am getting from three different tables details, food and hobbies, I want to combine this result group by name...


Name | food | hobby
-----------------------------------------------------------------
peter | chips | traveling
peter | burger | tennis
peter | burger | writing
Dave | lamb | game
Dave | kebab | reading


fine result that i want will be: here I only want to get name once and respective all values (even when it is duplicate) and other duplicate name rows should not contains any data..please help me with this sql query.. if there's any option in ireport to do this please let me know or any other keyword/inner queries in sql, i tried there group by option while you design table in it.. but it is not working... thanks in advance


Name | food hobby
--------------------------------------------------------------
peter | chips | traveling
------ | burger | tennis
------ | burger | writing
Dave | lamb | game
------- | kebab | reading
 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is what i mean by results::::


Name | food hobby
--------------------------------------------------------------
peter | chips | traveling
------ | burger | tennis
------ | burger | writing
Dave | lamb | game
------- | kebab | reading
 
K. Tsang
Bartender
Posts: 3583
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what's your sql look like?
 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


i want to group the same by list.listid
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic