Upload
reese-norman
View
18
Download
0
Embed Size (px)
DESCRIPTION
Modeling Scientific Data Kai Lin Viswanath Nandigam. SQL Exercises. Find all materials and rock types in the table view navdat.newmexicolat_long in the ‘Albuquerque Basin’ Region. SELECT material, rock_type FROM NAVDAT.NEWMEXICOLAT_LONG WHERE region = 'Albuquerque Basin'. - PowerPoint PPT Presentation
Citation preview
1
Modeling Scientific DataKai Lin
Viswanath Nandigam
SQL Exercises
2
SELECT material, rock_type
FROM
NAVDAT.NEWMEXICOLAT_LONG
WHERE region = 'Albuquerque Basin'
Find all materials and rock types in the table view
navdat.newmexicolat_long in the ‘Albuquerque Basin’ Region
Find all materials and rock types in the table view
navdat.newmexicolat_long in the ‘Albuquerque Basin’ Region
3
SELECT name
FROM navdat.geological_time
WHERE max_age < 30
ORDER BY min_age DESC, max_age ASC
Find all the geologic age names in the table view navdat.geological_time with the
condition that each geologic age should be completely after 30 million years ago
and sort the result above according to their time intervals
Find all the geologic age names in the table view navdat.geological_time with the
condition that each geologic age should be completely after 30 million years ago
and sort the result above according to their time intervals
4
SELECT MAX(latitude), MAX(longitude), MIN(latitude), MIN(longitude)
FROM
NAVDAT.NEWMEXICOLAT_LONG
WHERE region = 'Sandia Mountains'
Find maximum / minimum longitude / latitude
of the ‘Sandia Mountains’ coverage Region
in the table view navdat.newmexicolat_long
Find maximum / minimum longitude / latitude
of the ‘Sandia Mountains’ coverage Region
in the table view navdat.newmexicolat_long
5
SELECT name
FROM navdat.geological_time
WHERE max_age < min_age
Check if there is an error in the table view navdat.geological_time, for example, the starting time of
a geological age is later than its ending time
Check if there is an error in the table view navdat.geological_time, for example, the starting time of
a geological age is later than its ending time
6
SELECT name
FROM navdat.geological_time
WHERE max_age > min_age
ORDER BY max_age - min_age
FETCH FIRST 1 ROW ONLY
Find the shortest geologic age in the table view navdat.geological_time
Find the shortest geologic age in the table view navdat.geological_time