By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,207 Members | 1,028 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,207 IT Pros & Developers. It's quick & easy.

max,min

P: n/a
Table (continent,country,city,district,score)
a aa a1 g1a 100
a aa a1 g2a 99
a aa a1 g3a 99
a aa a1 f4d 89
a aa a1 f43 77
a aa a1 f4f 88
a aa a1 f4s 88
a aa a1 h34 67
a aa a1 h35 56
a aa a1 h36 76

a aa a2 g1a 99
a aa a2 g2a 67
a aa a2 g3a 89
a aa a2 f4d 33
a aa a2 f43 42
a aa a2 f4f 45
a aa a2 f4s 45
a aa a2 h34 78
a aa a2 h35 45
a aa a2 h36 66

a ab a1 g1a 44
a ab a1 g2a 45
a ab a1 g3a 76
a ab a1 f4d 45
a ab a1 f43 78
a ab a1 f4f 56
a ab a1 f4s 56
a ab a1 h34 89
a ab a1 h35 56
a ab a1 h36 56

a ab a2 g1a 44
a ab a2 g2a 67
a ab a2 g3a 44
a ab a2 f4d 55
a ab a2 f43 45
a ab a2 f4f 39
a ab a2 f4s 36
a ab a2 h34 23
a ab a2 h35 43
a ab a2 h36 20
how to obtain max,min score
per starting alphabet 'g','f','h'
for each city and country?.


--
Sent by 3 from yahoo in area com
This is a spam protected message. Please answer with reference header.
Posted via http://www.usenet-replayer.com
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Group a CASE statement something like ...

max(when substring(city,1,1)='g'then score else 0 end) "max for G"
min(when substring(city,1,1)='g'then score else 0 end) "min for G"

etc
"al********@yahoo.com" <u1********@spawnkill.ip-mobilphone.net> wrote in
message news:l.*********************@[63.127.215.130]...
Table (continent,country,city,district,score)
a aa a1 g1a 100
a aa a1 g2a 99
a aa a1 g3a 99
a aa a1 f4d 89
a aa a1 f43 77
a aa a1 f4f 88
a aa a1 f4s 88
a aa a1 h34 67
a aa a1 h35 56
a aa a1 h36 76

a aa a2 g1a 99
a aa a2 g2a 67
a aa a2 g3a 89
a aa a2 f4d 33
a aa a2 f43 42
a aa a2 f4f 45
a aa a2 f4s 45
a aa a2 h34 78
a aa a2 h35 45
a aa a2 h36 66

a ab a1 g1a 44
a ab a1 g2a 45
a ab a1 g3a 76
a ab a1 f4d 45
a ab a1 f43 78
a ab a1 f4f 56
a ab a1 f4s 56
a ab a1 h34 89
a ab a1 h35 56
a ab a1 h36 56

a ab a2 g1a 44
a ab a2 g2a 67
a ab a2 g3a 44
a ab a2 f4d 55
a ab a2 f43 45
a ab a2 f4f 39
a ab a2 f4s 36
a ab a2 h34 23
a ab a2 h35 43
a ab a2 h36 20
how to obtain max,min score
per starting alphabet 'g','f','h'
for each city and country?.


--
Sent by 3 from yahoo in area com
This is a spam protected message. Please answer with reference header.
Posted via http://www.usenet-replayer.com


Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.