Question: Item Table Purchase Table Based on the Goods table and Purchases table, solve the following cases, 1. Write a query to display Nama_Pembeli and Jumlah_Pembelian
Item Table

Purchase Table

Based on the Goods table and Purchases table, solve the following cases, 1. Write a query to display Nama_Pembeli and Jumlah_Pembelian that has an average purchase of more than 5. 2. Write a query to display ID_Barang, Nama_Barang, and Jumlah_pembelian that are the fewest in number. 3. Write a query to display ID_Barang, Nama_Barang, Jumlah_Pembelian that have been sorted from the initial date of purchase to the end purchase. 4. Write a query to display Nama_Barang, Tanggal_Terima, and Stok_Barang in the Item Table with more than three purchase quantities and dates purchase between June 1, 2022 to December 30, 2022.
\begin{tabular}{|l|l|} \hline Nama Field & Tipe Data \\ \hline ID_Barang & Varchar \\ \hline Nama_Barang & Varchar \\ \hline Tanggal_Terima & Datetime \\ \hline Stok_Barang & Int \\ \hline \end{tabular} \begin{tabular}{|l|l|} \hline Nama Field & Tipe Data \\ \hline ID_Pembeli & Varchar \\ \hline ID_Barang & Varchar \\ \hline Tanggal_Beli & Datetime \\ \hline Jumlah_Pembelian & Int \\ \hline Nama_Pembeli & Varchar \\ \hline \end{tabular}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
