Documente Academic
Documente Profesional
Documente Cultură
EXAMPLE:
select mem_id, mem_fname, mem_lname,
CONCAT ((, substring(mem_phone,1,3),),
substring(mem_phone,4,3), _,
substring(mem_phone,7,4,)) as
mem_phone,
mem_email
from member
order by mem_lname, asc;
Questions:
1.
(old style join)
select mem_fname, mem_lname, lon_loan_date, lon_due_date,
b.bok_isbn, bok_title, aut_fname, aut_lname
from member m, loaner l, book b, attribution at, author a
where m.mem_id=l.mem_id
and 1.bok_isbn=b.bok_isbn
and b.bok_isbn=at.bok_isbn
and at.aut_id=a.aut_id
ordery by lon_due_date desc;
(join on)
select mem_fname, mem_lname, lon_loan_date, lon_due_date,
b.bok_isbn, bok_title, aut_fname, aut_lname
from member m
join loader l on m.mem_id=l.mem_id
join book b on l.bok_isb=b.bok_isbn
join attribution at on b.bok_isbn+at.bok_isbn
join author a on at.aut_id=a.aut_id
order by lon_due_date=desc;
(join using)
select mem_fname, mem_lname, lon_loan_date, lon_due_date,
b.bok_isbn, bok_title, aut_fname, aut_lname
from member
join loaner using (mem_id)
join book using (bok_isbn)
join attribution using (bok_isbn)
3.
select * from member;
Step #1
Select bok_price * .85
From book
Where bok_isbn=1234567890345;
Step #2
Select concat(Purchased book at discounted price:,&, format
(bok_price *.85,2))
From book
Where bok_isbn=1234567890345;
Step#3
Update member
Set mem_notes =
(