Home / Expert Answers / Computer Science / b-draw-a-flow-graph-and-calculate-the-cyclomatic-complexity-for-the-algorithm-program-created-in-t-pa681

(Solved): b) Draw a flow graph and calculate the cyclomatic complexity for the algorithm/program created in t ...




b) Draw a flow graph and calculate the cyclomatic complexity for the algorithm/program created in task \( 2 \mathrm{a} \).
(1

USE Product_details;
CREATE Table Products (
Order_date date,
Sales int);
INSERT IGNORE INTO Products(Order_date,Sales)
VALUES(2021
b) Draw a flow graph and calculate the cyclomatic complexity for the algorithm/program created in task \( 2 \mathrm{a} \). (10 marks) Tasks to be done - Draw the flow graph based on the program/algorithm. The flow of the graph must be accurate and mapped to the algorithm /program - Calculate the cyclomatic complexity USE Product_details; CREATE Table Products ( Order_date date, Sales int); INSERT IGNORE INTO Products(Order_date,Sales) VALUES('2021-01-01',20),('2021-03-02',32), ('2021-02-03',45), ('2021-01-04',31),('2021-03-05',33),, ('2021-01-06',19), ('2021-04-07',21),,('2021-03-08',10),,('2021-02-09',40), ('2021-03-10',20), ('2021-03-11',26),,('2021-04-12',22), ('2021-04-13',10), ('2021-01-14',28),,('2021-03-15',15), ('2021-01-16',12), ('2021-04-17',10),,('2021-02-18',18), ('2021-04-19',14), ('2021-01-20',16),,('2021-02-21',12), ('2021-03-22',51), ('2021-02-23',13),,('2021-03-24',15), ('2021-02-25',30), ('2021-03-26',14),,('2021-04-27',16), ('2021-02-28',15),,('2021-01-29',20),,('2021-01-30',18); SELECT * FROM Products; SELECT YEAR(Order_date) AS Year, MONTH(Order_date) AS Month,SUM(Sales) AS Total_Sales FROM Products GROUP BY YEAR(Order_date), MONTH(Order_date) ; SELECT YEAR(Order_date) AS Year,MONTH(Order_date)AS Month,COUNT(Sales) AS Count_Of_Sales FROM Products GROUP BY YEAR(Order_date),MONTH(Order_date); SELECT YEAR(Order_date) AS Year, DATENAME(MONTH, Order_date) AS Month, COUNT(Sales) AS Count_Of_Sales FROM Products GROUP BY YEAR(Order_date), RATENAME(MONTH, Order_date); SELECT YEAR(Order_date) AS Year, RATENAME(MONTH, Order_date) AS Month, COUNT(Sales) AS Count_Of_Sales FROM Products GROUP BY YEAR(Order_date), RATENAME(MONTH, Order_date) ORDER BY Count_Of_Sales DESCi


We have an Answer from Expert

View Expert Answer

Expert Answer


Flowchart: Products Order_date date Sales int The flow chart contains the database table which is given in the question as follows
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe