473,396 Members | 2,037 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

GROUP BY cluse

I am trying to use GROUP BY cluse, what is the utility of this cluse in
MySQL
plz. any body tell me

Aug 28 '06 #1
6 3290
jatrojoomla wrote:
I am trying to use GROUP BY cluse, what is the utility of this cluse in
MySQL
plz. any body tell me
I'm not sure what you're asking. What are you trying to do?

P.S. This isn't a php question. It's strictly a SQL question.
alt.php.sql and php.general removed from the reply.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Aug 28 '06 #2
jatrojoomla wrote:
I am trying to use GROUP BY cluse, what is the utility of this cluse in
MySQL
plz. any body tell me
Not sure, by your question, if you are asking how to use GROUP BY
clause. If you are then look here:

http://dev.mysql.com/doc/refman/5.1/...modifiers.html

--
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Aug 28 '06 #3
It works basically the same as in other SQL driven databases, excepting that
it uses single quotes for instead of double.

Sample of character, numerical, and table to table link in WHERE clause:

WHERE table1.field1 = 'some parameter' AND table1.field2 = 6 AND
table1.field5 = table3.field1

With character and date fields use single quote marks around the parameter
value, and skip the single quotes for numerical arguments.

This is the basic structure, but you can do far more operators and
nestings... but it is basically SQL 92 compliant (depending on your version
of MySQL, which you did not specify).

Cheers!

~ Duane Phillips.

"jatrojoomla" <ja*********@gmail.comwrote in message
news:11**********************@74g2000cwt.googlegro ups.com...
>I am trying to use GROUP BY cluse, what is the utility of this cluse in
MySQL
plz. any body tell me

Aug 29 '06 #4
example: SELECT * FROM abc WHERE name='abc' GROUP BY age

jatrojoomla wrote:
I am trying to use GROUP BY cluse, what is the utility of this cluse in
MySQL
plz. any body tell me
Aug 29 '06 #5
OK. I posted my answer to the wrong message. *sigh*. Not my day.

And Group By has been handled enough by the other posters...

Cheers...

"Duane Phillips" <du************@askme.askmewrote in message
news:-a******************************@giganews.com...
It works basically the same as in other SQL driven databases, excepting
that it uses single quotes for instead of double.

Sample of character, numerical, and table to table link in WHERE clause:

WHERE table1.field1 = 'some parameter' AND table1.field2 = 6 AND
table1.field5 = table3.field1

With character and date fields use single quote marks around the parameter
value, and skip the single quotes for numerical arguments.

This is the basic structure, but you can do far more operators and
nestings... but it is basically SQL 92 compliant (depending on your
version of MySQL, which you did not specify).

Cheers!

~ Duane Phillips.

"jatrojoomla" <ja*********@gmail.comwrote in message
news:11**********************@74g2000cwt.googlegro ups.com...
>>I am trying to use GROUP BY cluse, what is the utility of this cluse in
MySQL
plz. any body tell me


Aug 29 '06 #6
Justin wrote:
example: SELECT * FROM abc WHERE name='abc' GROUP BY age

jatrojoomla wrote:
>I am trying to use GROUP BY cluse, what is the utility of this cluse in
MySQL
plz. any body tell me
That isn't really useful, however.

A real application would be, for example, "SELECT age FROM abc GROUP BY age",
which does the same job as "SELECT DISTINCT age ...", selecting only those ages
that are different.

Or "SELECT age,count(*) FROM abc GROUP BY age", which will count the records for
each value of age.

--
CB
Nov 25 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
2
by: Tom Loach | last post by:
Our system administrator set up an NT server group in order to allow our users to login to our application via https to our sql server. The group appears as a User in SQL Server when you look at...
4
by: Chad Richardson | last post by:
I've always been mistified why you can't use a column alias in the group by clause (i.e. you have to re-iterate the entire expression in the group by clause after having already done it once in the...
2
by: BillD | last post by:
I'm trying to derive a schema from a base schema. I want to redefine a "group" from the base schema in my derived schema in order to add more options to the "choice" aggregate (see schema1.xsd...
16
by: michael | last post by:
Is it possible to get all href URLs contained in a unordered list and place them in an array? Or in fact two different arrays, differently named one for each <ul> group? <ul> <li><a...
7
by: Darin | last post by:
I have a report that sub-totals on a group, then grand-totals at the report footer. If there's only one group, the sub-total and grand total are redundant, so I only want to show one of them. I...
1
by: David Horowitz | last post by:
Hi folks. I need to create a report that has a Group Header that pulls certain data from the Detail section. It's something like this: +--Report---------------------------------------- |...
7
by: Sameh Ahmed | last post by:
Hello there IsInrole gives ya the means to check if the current or impersonated user belongs to a specific windows role or group. is there a way to do the same without using ADSI to check if...
3
by: Sebastian | last post by:
Hello all I have a report where I have two nested groups. I know there are only three standard options for running sum: None, Over Group and Over All. I have a MyTextBox in detail section where...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.