Earn Higher Grades With Instant Assignment Help.Ask Question!

Database
(5/5)

Write SQL queries for the following from the database Waterlab. For queries 1, 2, and 4, you may optionally use the With clause.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Project 1     ISM 6205   MSIS   Spring 2020   Batra

Write SQL queries for the following from the database Waterlab. For queries 1, 2, and 4, you may optionally use the With clause.

  1. For parameter ‘Dissolved Ammonia’, sample date less than ‘2016-04-30’, and station 10 or 87, list station information as shown below along with result and column MaxR, which is the maximum value of result for each station for the mentioned restrictions. You may optionally usethe With clause. Order by station id and sample date.

     

  1. The purpose of this query is to show the ratio of result/average for each parameter (AvgR) where the ratio is greater than 40. In other words, the restriction is result > 40*AvgR. List station information as shown below along with the parameter, date, result, average for the parameter, and the ratio result/AvgR as Ratio1. You may optionally use the With clause. Although the results shown for AvgR and Ratio1 are cast as decimal (8,2), you don’t have to use the Cast keyword.

 

  1. List counties that satisfy both conditions (not just any of the two): 1) the result is greater than 0.5 for the parameter ‘Dissolved Arsenic’, and 2) the result is greater than 250 for the parameter ‘Dissolved Hardness’. Read the question carefully: county name, not station id. No sorting needed.

 

  1. For the parameter ‘Turbidity’, show all cases where the difference in result is greater than 35 for the same station. You may optionally use the With clause to restrict the rows for the parameter ‘Turbidity’ before you check for stations that on different occasions have had result difference > 35. No sorting needed.
Attachments:
(5/5)

Expert's Answer

23 Times Downloaded

Related Questions

CSI 1420 Introduction to C Programming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two majorconstructs of the C programming language – Fu

The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

23 Times Downloads

Ask This Assignment To Be Done By Our ExpertsGet A+ Grade Solution Guaranteed

expert
joyComputer science
(4/5)
12 Answers Hire Me
expert
Robert DLaw
(4.8/5)
691 Answers Hire Me
expert
Dr Samuel BarberaStatistics
(5/5)
736 Answers Hire Me
expert
Tutor For YouEconomics
(5/5)
735 Answers Hire Me