oracle - Two Table SQL review -


!(http://imgur.com/rglmvue)

a pic of tables above.

  1. list youngest customer.
  2. list orders (ordereid, order date, amount) along customer details.

i struggling these 2 questions.

can't see table name pic?

  1. list youngest customer. try replact [top table pic] name of actual table.

    select custfname, custlname, min(date)  (select  *, cast(dateofbirth date) date customers) group 1,2; 

or

select top 1 * customers order dateofbirth asc 

4.list orders (ordereid, order date, amount) along customer details.

select a.*, b.custlname, b.custfname, b.dateofbirth, b.custcity orders  left join customers b on b.custid = a.custid 

Comments

Popular posts from this blog

php - Passing multiple values in a url using checkbox -

compilation - PHP install fails on Ubuntu 14 (make: *** [sapi/cli/php] Error 1) PHP 5.6.20 -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -