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

joins

P: 6
Hi every one

Pl look into the situation

Tables
Product(maker, model, type)
PC(code, model, speed, ram, hd, cd, price)
Laptop(code, model, speed, ram, hd, screen, price)
Printer(code, model, color, type, price)


requirement:

Define the maximal price of PC produced by each maker.
Result set: maker, maximal price.

thanks in advance
Mar 15 '07 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 534
The two links below should give you everything you need to write this query.

Table Expressions

Joins between Tables
Mar 15 '07 #2

P: 6
The two links below should give you everything you need to write this query.

Table Expressions

Joins between Tables
Hi michale

wats wrong with this

select maker,max(price) from product natural join pc group by 1;
Mar 15 '07 #3

Expert 100+
P: 534
Your requiremens says:
Define the maximal price of PC produced by each maker.
but you are joining tables on model.

It seems you need to work on your schema....
Table PC, for example has no field that can be used to identify a maker.
Mar 16 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.