Professional Documents
Culture Documents
Smart Analytics of Electricity Billing System
Smart Analytics of Electricity Billing System
Part 2: Relational data model. Take a subset of the ideas from the conceptual
model you constructed in Part 1 and design a simple relationship model similar to
the ones we discussed in Module 2, Video 4
Part 3: SQL queries. Using the data model you constructed in Part 2, come up with
two data extracts you think would be interesting, then write SQL queries to provide
each one.
RESPONSE :
1. List name and qualifications of male users with usage more than 200 units
SELECT a.Cname ,a.CQual, b.consumption
FROM Customer a, BILL b
INNER JOIN BILL
ON a.Cid=b.Cid
WHERE b.consumption>200
AND cSex="male";
2. Insert details into employee table