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
-- Investigating purchasing.productvendor and purchasing.vendor | |
\d purchasing.productvendor | |
\d purchasing.vendor | |
-- How many records are there in each table? | |
-- How many different businessentityid? | |
select | |
count(*) as num_records, | |
count(distinct businessentityid) as num_businessentityid |
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
-- Are there any null values in the EndDate field | |
-- of the humanresources.employeedepartmenthistory table? | |
-- If so how many records are there? | |
select count(*) | |
from humanresources.employeedepartmenthistory | |
where EndDate is null; | |
-- How many records are there where EndDate is not null? | |
select count(*) | |
from humanresources.employeedepartmenthistory |
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
#!/usr/bin/env python3 | |
import requests # for getting URL | |
import json # for parsing json | |
from datetime import datetime # datetime parsing | |
import pytz # timezone adjusting | |
import csv # for making csv files | |
import os | |
################################################################# |
OlderNewer