Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello, I need some assitance formatting a Query for this question: print a deliv

ID: 3820699 • Letter: H

Question

Hello,

I need some assitance formatting a Query for this question:

print a delivery schedule report for each day and then each location. The format of this report must be as follows: a) the Restock Date must be centered and underlined; b) for each location which has a delivery on this date, the Longitude and Latitude must be centered, c) for each vending machine at this location, the VMID, Number of Choices, and Slots Per Choice must appear as a table under the location information. NOTE: only Restock Dates after the current date must be displayed (all others would have already occurred).

The two tables that I am using are: VendingMachine(VMID, NumberOfChioces, SlotsPerChoice, Latitude, Longitude) VMID - primary key / Latitude, Longitude - Foreign Keys

and Shedule(Latitude, Longitude, RestockDate)

This is currently being perfomed in Oracle with a JDBC connection in a terminal. I am having issues grouping the dates to only show one underlined to meet the requirements.

Thank you for your help!

Explanation / Answer

select v.VMID, s.Latitude, s.Longitude, s.RestockDate

from

VendingMachine v, Shedule s

where

s.Latitude = v.Latitude

and

s.Longitude = v.Longitude

and

s.RestockDate > sysdate

group by s.RestockDate

order by s.Restockdate ASC

-- The order by clause will show the same dates consecutively.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote