Group by having [message #317808] |
Sat, 03 May 2008 17:08  |
himesh
Messages: 5 Registered: May 2008
|
Junior Member |
|
|
Hi,
If i need to query two tables using the group by having clause, how is the code written?
would the following work?
SELECT column,SUM(column) FROM table and table
GROUP BY column
HAVING SUM(column) condition value
|
|
|
|
Re: Group by having [message #317810 is a reply to message #317809] |
Sat, 03 May 2008 17:22   |
himesh
Messages: 5 Registered: May 2008
|
Junior Member |
|
|
thanks for your help but being a noob, i am completly useless at the whole sql thing! also the link that you gave me did not cover querying two tables using the group by having clause
|
|
|
Re: Group by having [message #317811 is a reply to message #317808] |
Sat, 03 May 2008 17:35   |
 |
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
>the link that you gave me did not cover querying two tables using the group by having clause
Wrong.
This fine manual describes how to construct EVERY valid SELECT statement.
You just need to learn how to read & understand what is contained in it.
Is GOOGLE broken for you?
Results 1 - 10 of about 1,970,000 for select having group by
[Updated on: Sat, 03 May 2008 17:43] by Moderator Report message to a moderator
|
|
|
|
|
Re: Group by having [message #317814 is a reply to message #317808] |
Sat, 03 May 2008 20:46  |
 |
Barbara Boehmer
Messages: 9104 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
Are you using Oracle or a MySQL database? Please copy and paste what you get when you type this:
SQL> SELECT * FROM V$VERSION;
If you are using MySQL as the table structure of your other post seemed to indicate, then you are still in the wrong forum. This is an Oracle forum, not a MySQL forum. Any answers that you might receive here that would run on an Oracle database would most likely not run on a MySQL database. The two are completely different and only share minimal common SQL syntax.
|
|
|