FAQ
Members List
Calendar
Mark Forums Read
need help on sql query
dbTalk Databases Forums
Databases
comp.database.oracle
need help on sql query
comp.database.oracle
comp.database.oracle
Discuss
need help on sql query
in the
comp.database.oracle
forum.
Thread Tools
Display Modes
#
1
longhorntx
Posts: n/a
need help on sql query -
03-22-2005 , 09:39 AM
hi,
I have a following table data-
city region issue value
c1 north i1 y
c1 north i2 y
c2 north i1 n
c2 north i2 y
c3 south i1 y
c3 south i2 n
c4 east i1 n
c4 east i2 n
This table has value for each issue in every city.
How can I create a report from this which looks like-
region issue count(yes)
north i1 2
north i2 1
south i1 1
south i2 0
east i1 0
east i2 0
Please help/ideas for sql query
longhorntx
#
2
Fiddler
Posts: n/a
Re: need help on sql query -
03-25-2005 , 03:14 AM
select region, issue, count(*) from <table> where value = y
union
select region, issue, count(*) from <table> where value = n
Fiddler
«
Previous Thread
|
Next Thread
»
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
vB code
is
On
Smilies
are
On
[IMG]
code is
On
HTML code is
Off
Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Contact Us
-
dbTalk Databases Forums
-
Archive
-
Top