CIS 4400 Lecture Notes - Lecture 2: Relational Algebra, Data Definition Language, Microsoft Excel

103 views2 pages

Document Summary

-figure out what is in the salesperson table. -runs the query, orders by descending order, fetch only the first row. Need to have order by and then fetch. [question 8 in hw: view: giving a name to your query. Does not store any data, a simple pointer to a query: when you create a view, all aggregate functions need to have an column alias. -to access the view later, use this query. -adding a view to an inner join (error: ccustomer_id1 created because there is a duplicate column name, can"t make a view) -create view + natural join (removes duplicate column created, no need for on statement either) -how to natural join a bunch of columns. Rank: set of statements used in sql to do analytical things. - use rank, include order by clause in select statement. Rank() over (order by count(o. orderid) desc) as "rank"

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents