This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- When did these orders occur ? | |
-- How many records are there? | |
-- How many orders are there? | |
select | |
min(duedate) as min_duedate, | |
max(duedate) as max_duedate, | |
count(*) as num_records, | |
count(distinct purchaseorderid) as num_orders | |
from purchasing.purchaseorderdetail; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * | |
from purchasing.productvendor | |
limit 10; | |
select * | |
from purchasing.purchaseorderdetail | |
limit 10; | |
select * | |
from purchasing.purchaseorderheader |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- connect to the Adventureworks database | |
\c Adventureworks | |
-- view all tables in all schemas | |
\dt *.* | |
-- vew all tables in the purchasing schema | |
\dt purchasing.* |
NewerOlder