Page 1 of 1

Consider a sales data store with the following data structure, where all values are either integer or real. Each record

Posted: Thu Jul 14, 2022 2:28 pm
by answerhappygod
Consider a sales data store with the following data structure, where all values are either integer or real. Each record consists of eight attributes; the set of allowable values of the attributes and format are specified in the description (metadata).
Order No Integer
Product No Integer
Price Price of each product (Real/Float)
Quantity Integer
Sales Real/Float
MonthId Integer (1-12)
YearId Integer
Sample records are included in the following table. You can include additional records to illustrate the solution
Consider A Sales Data Store With The Following Data Structure Where All Values Are Either Integer Or Real Each Record 1
Consider A Sales Data Store With The Following Data Structure Where All Values Are Either Integer Or Real Each Record 1 (269.13 KiB) Viewed 19 times
a) the SQL statement to create the corresponding table
\begin{tabular}{|l|l|l|l|l|l|l|} \hline OrderNo & ProductNo & Price & Quantity & Sales & Monthld & Yearld \\ \hline 10107 & 2 & 95.7 & 30 & 2871 & 2 & 2003 \\ \hline 10107 & 5 & 99.91 & 39 & 3896.49 & 2 & 2003 \\ \hline 10110 & 9 & 86.13 & 29 & 2497.77 & 2 & 2003 \\ \hline 10121 & 5 & 81.35 & 34 & 2765.9 & 11 & 2003 \\ \hline 10134 & 2 & 94.74 & 41 & 3884.34 & 7 & 2004 \\ \hline 10134 & 5 & 100 & 27 & 3307.77 & 7 & 2004 \\ \hline 10159 & 14 & 100 & 49 & 5205.27 & 10 & 2005 \\ \hline 10161 & 9 & 86.13 & 29 & 2497.77 & 10 & 2005 \\ \hline 10163 & 14 & 100 & 20 & 2000 & 10 & 2005 \\ \hline 10168 & 1 & 96.66 & 36 & 3479.76 & 10 & 2006 \\ \hline 10180 & 12 & 100 & 42 & 4695.6 & 11 & 2006 \\ \hline & & & & & & \\ \hline… & … & … & … & … & … & … \\ \hline & & & & & & \\ \hline \end{tabular}