Question: SQL SERVER (SQL FUNCTION CHAPTER) QUERY help. Please use the data entity and attribute names on the diagram provided. Any help would be greatly appreciated!

SQL SERVER (SQL FUNCTION CHAPTER) QUERY help.

Please use the data entity and attribute names on the diagram provided. Any help would be greatly appreciated!

1) Write a SELECT statement that returns these columns from the Invoice table:

-A column that uses the CAST function to return the total amount with 1 digit to the right of the decimal point

-A column that uses the CONVERT function to return the total amount as an integer

-A column that uses the CAST function to return the total amount as an integer

2) write a SELECT statement that returns these columns for all active records from the Promotion table:

The start date column

-A column that uses the CAST function to return the start date column with its date only (year, month, and day)

-A column that uses the CAST function to return the start date column with its full time only (hour, minutes, seconds, and milliseconds)

-A column that uses the CAST function to return the start date column with just the year and month

SQL SERVER (SQL FUNCTION CHAPTER) QUERY help. Please use the data entity

Please use the data entity and attribute names on the diagram provided. Any help would be greatly appreciated!

\begin{tabular}{|l|l|} \hline \multicolumn{2}{|c|}{ LOCATION } \\ \hline PK & LocationID \\ \hline & LocStreetNum \\ LocStreetName \\ LocCity \\ LocState \\ LocZip \\ LocEmail \\ LocPhone \\ CreatedDate \\ \hline \end{tabular} \begin{tabular}{|l|l|} \hline \multicolumn{2}{|c|}{ PROMOTION } \\ \hline PK & PromoCode \\ \hline & PromoDescription \\ StartDate \\ EndDate \\ Status \\ \hline \end{tabular} \begin{tabular}{|l|l|} \hline \multicolumn{2}{|c|}{ PAYMENT } \\ \hline PK & PaymentID \\ \hline & PaymentType \\ AccountNum \\ RoutingNum \\ CreditCardNum \\ CCExpDate \\ CCSecurityNum \\ Status \\ CreatedDate \\ \hline \end{tabular} \begin{tabular}{|l|l|} \hline \multicolumn{2}{|c|}{ PROMO_SVC } \\ \hline PK & PromeservID \\ \hline FK & ServicelD \\ FK & PromoCode \\ & CreatedDate \\ \hline \end{tabular} \begin{tabular}{|l|l|} \hline \multicolumn{2}{|c|}{ INVOICE } \\ \hline PK & InvoicelD \\ \hline FK & CustomerID \\ FK & OrderiD \\ FK & EmployeelD \\ & SubTotal \\ TaxAmount \\ TotalAmount \\ InvoiceDate \\ \hline \end{tabular} CellPhone Title DateOfHire

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!