Question: Oracle SQL Homework: 4. Write a SELECT statement that returns these columns from the Invoices table: The invoice_number column The invoice_date column The invoice_date column

Oracle SQL Homework:

4. Write a SELECT statement that returns these columns from the Invoices table:

The invoice_number column

The invoice_date column

The invoice_date column plus 30 days

The payment_date column

A column named days_to_pay that shows the number of days between the invoice date and the payment date

The number of the invoice_dates month

The four-digit year of the invoice_date

The last day of the invoice dates month

When youve got this working, add a WHERE clause that retrieves just the invoices for the month of May based on the invoice date, not the number of the invoice month.

5. Write a SELECT statement that returns these columns from the Invoices table:

The invoice_number column

The balance due (invoice total minus payment total minus credit total) with commas, a decimal point, and two decimal positions

A column named Balance Rank that uses the RANK function to return a column that ranks the balance due in descending order.

6. Design a database for tracking memberships

Draw a database diagram for a database that tracks the memberships for an association and for the groups within the association. Assume that each member can belong to any number of groups and that each group can have any number of members.

Modify your design for exercise 2 to keep track of the role served by each individual in each group. Assume that each individual can only serve one role within a group and that each group has its own set of roles that members can fulfill.

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!