Microsoft
Software
Hardware
Network
Question : msql cout by group query
hi, i am struggling with a query...
i have a table..
id type way
1 RW 2
2 FF 3
3 RW 3
4 RW 2
5 RW 2
6 RW 1
7 RW 2
I am wanting to list each unique type/way pair(way could be any number) with the number of times it occurs, eg...the above would return...
type way count
RW 1 1
RW 2 4
RW 3 1
FF 3 1
i know i can count one pair...
SELECT COUNT(type) AS the_type WHERE way='1' AND type ='RW'
i can then echo the_type with php, but how do i count and echo all type/way pairs
cheers
Answer : msql cout by group query
select distinct id, count(type), count(way) from Table
group by type, way;
Random Solutions
How to get an USB speaker to work with Eee PC 900 Xandros Linux
I need to query each group in an OU in the Root Domain and get the group names that has exact identical users.
how to truncate the transaction logs in exchange 2010 after NT backup
Citrix not finding the license server
not seeing auto-recover version of a force-closed excel (2007) document
red ant
backup multiple DBs in script
vb.net Insert comma every 3 characters
InDesign/MAC PrintBooklet to a PDF file on a mac
Globally Hide Mouse after Inactive without using constantly running Timer Interval