Concept explainers
“COUNT()” function:
In SQL, the “COUNT()” function will return the total number of rows in the table with satisfying the criteria mentioned in the “WHERE” clause.
Table creation:
Query to create “INVOICE” table:
CREATE TABLE INVOICE (INV_NUMBER INTEGER PRIMARY KEY, CUS_CODE INTEGER, INV_DATE DATE);
Query to insert values into “INVOICE” table:
INSERT INTO INVOICE VALUES (1001, 10014, '16-Jan-18');
INSERT INTO INVOICE VALUES (1002, 10011, '16-Jan-18');
INSERT INTO INVOICE VALUES (1003, 10012, '16-Jan-18');
INSERT INTO INVOICE VALUES (1004, 10011, '17-Jan-18');
INSERT INTO INVOICE VALUES (1005, 10018, '17-Jan-18');
INSERT INTO INVOICE VALUES (1006, 10014, '17-Jan-18');
INSERT INTO INVOICE VALUES (1007, 10015, '17-Jan-18');
INSERT INTO INVOICE VALUES (1008, 10011, '17-Jan-18');

Trending nowThis is a popular solution!

Chapter 7 Solutions
Bundle: Database Systems Design, Implementation, & Management, Loose-leaf Version, 13th + MindTapV2.0, 1 term Printed Access Card
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781285196145Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos CoronelPublisher:Cengage Learning


