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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started