SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
#write a SQL calculate the monthly commission payouts and gross margins per product based on the provided commission schemes create table customer ( order_date date, product char, provider varchar(64), order_count int, revenue int ); ######Interting values in table INSERT INTO customer VALUES ('2021-06-21', 'D', 'roadrunner', 26, 1789), ('2021-06-21', 'D', 'micky_mouse', 9, 540), ('2021-06-21', 'A', 'micky_mouse', 7, 1839), ('2021-05-21', 'B', 'roadrunner', 26, 1789), ('2021-06-24', 'C', 'Tom', 26, 1789), ('2021-05-21', 'D', 'Donald', 249, 1587) ; #Need to calculate monthly commission payouts and gross margins per product based on the provided commission schemes #Below is comission rates: #Provider Commission Scheme #Tom 8000fixed / month #Roadrunner 50 / order #Mickey Mouse First 500 orders per month for 10,000 fixed, then 10 / order for every additional order #Donald 50 / order
Stuck with a problem? Got Error? Ask ChatGPT!
Copy Clear