From edf8ac230453a2dd383b22d04b9eb5984cf82d26 Mon Sep 17 00:00:00 2001 From: Ryan McAlary Date: Thu, 21 Sep 2023 15:43:03 +0100 Subject: [PATCH 1/2] list of sales employees and how much each has made in commission this year --- Comission.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Comission.sql diff --git a/Comission.sql b/Comission.sql new file mode 100644 index 0000000..83d05bb --- /dev/null +++ b/Comission.sql @@ -0,0 +1,13 @@ +USE Project_CoryD; + + + -- 13 = a list of sales employees and how much each has made in commission this year + + SELECT CONCAT(Sales_Fname, ' ' , Sales_Lname) as `Sales Employee`, Sales_CommRate * Project_Value as `Amount made in Commision` + FROM Sales_Employee + RIGHT JOIN Project using (Sales_ID) + WHERE current_date() - 1; + + + + \ No newline at end of file From 75a6a1b80fd7ff4041e0cc779a2100de1975a20a Mon Sep 17 00:00:00 2001 From: Ryan McAlary Date: Thu, 21 Sep 2023 15:59:05 +0100 Subject: [PATCH 2/2] list of sales employees and how much each has made in commission this year --- Comission2.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Comission2.sql diff --git a/Comission2.sql b/Comission2.sql new file mode 100644 index 0000000..cf6c762 --- /dev/null +++ b/Comission2.sql @@ -0,0 +1,7 @@ +USE Project_CoryD; + + -- 13 = a list of sales employees and how much each has made in commission this year +SELECT CONCAT(Sales_Fname, ' ' , Sales_Lname) AS `Sales Employee`, Sales_CommRate * Project_Value AS `Amount made in Commision` +FROM Sales_Employee +RIGHT JOIN Project USING (Sales_ID) +WHERE CURRENT_DATE() - 1; \ No newline at end of file