DAD 220 7-1 PROJECT TWO -
ANALYZING DATABASES
Intro to Structural Database Environments (Southern New Hampshire University)
220 DAD Intro to Struct Database Env 7-1 Project 2
, Analyze the number of returns by state and describe your findings in your report.
SELECT Customers.State AS State, COUNT(*) AS Return_Frequency
FROM Orders INNER JOIN RMA ON Orders.OrderID = RMA.OrderID
INNER JOIN Customers ON Customers.CustomerID = Orders.CustomerID
GROUP BY State
ORDER BY Return_Frequency DESC;
I used the query under the QuantigrationRMA database and I was able to get this output of returns by
state. Upon further inspection of my query the top State on returns by frequency is Massachusetts with
972 followed by Arkansas with 844. While this is just a basic numbers query it doesn’t dive deeper into
what items had the most returns.
2
ANALYZING DATABASES
Intro to Structural Database Environments (Southern New Hampshire University)
220 DAD Intro to Struct Database Env 7-1 Project 2
, Analyze the number of returns by state and describe your findings in your report.
SELECT Customers.State AS State, COUNT(*) AS Return_Frequency
FROM Orders INNER JOIN RMA ON Orders.OrderID = RMA.OrderID
INNER JOIN Customers ON Customers.CustomerID = Orders.CustomerID
GROUP BY State
ORDER BY Return_Frequency DESC;
I used the query under the QuantigrationRMA database and I was able to get this output of returns by
state. Upon further inspection of my query the top State on returns by frequency is Massachusetts with
972 followed by Arkansas with 844. While this is just a basic numbers query it doesn’t dive deeper into
what items had the most returns.
2