Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a query to display the invoice numbers, product SKUs, product descriptions

ID: 3648863 • Letter: W

Question

Write a query to display the invoice numbers, product SKUs, product descriptions, and band ID for sales of sealer and top coat products of the same brand on the same invoice The Binder Prime Company wants to recognize the employee who sold the most of their products during a specified period. Write a query to display the employee number, employee first name, employee last name, e-mail address, and total units sold for the employee who sold the most Binder Prime brand products between November 1,2011 and December 5, 2011. If there is a tie for most units sold, sort the output by employee last name.

Explanation / Answer

$query = "select * from LGINVOICE"; $result = mysql_query($query); while($row=mysql_fetch_array($result)){ $inv = $row["INV_NUM"]; $query = "select * from LINE_Num where INV_NUM=$inv"; $result1 = mysql_query($query); while($row1 = mysql_fetch_array($result1){ $sum+=$row1[PROD_SKU]; } $query = "insert into SEALER(INV_NUM,BRAND_ID) values($inv,$sum)"; mysql_query($query); }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote