Question: Codes are needed for Oracle SQL . Task 5 : Your manager says, Now I would like to know how many Dell or Samsung computers
Codes are needed for Oracle SQL
Task : Your manager says, "Now I would like to know how many Dell
or Samsung computers desktops tablets, laptops are currently being used by
employees in Sales or in Marketing. I want description information for which
department and the make, model, and extended information for each different
Dell or Samsung computer with a count of how many of each. And, of course, I
don't want information about computers or employees that are gone disposed of
or terminated
Note from IT boss: Be aware that the derived information in the
itassetinvsummary table is not kept up to date in an automated way, so use
only data from other tables.
Task Your manager says, "Now for the list of how many Dells
or Samsung computers are currently being used by employees in Sales or
Marketing that you just created, add rows that show the total
numbers of each make for each department."
Note from IT boss: Be aware that the derived information in the
itassetinvsummary table is not kept up to date in an automated way, so use
only data from other tables..
ABCCo has several software apps built inhouse that are shared and used by
customers and potential customers who download one or more apps after registering
online with information that includes their location.
ABCCo wishes to track information about which download server is used the most
by customers requesting a download. ABCCo is designing and building
infrastructure to capture and record data about downloads. Your team is implementing
and testing the backend for the information system being built.
There are ten download servers worldwide in different time zones. Customers are
worldwide. The ten time zones for the servers are AfricaLagos AfricaJohannesburg AmericaChicago AmericaLaPaz, AmericaNewYork, AmericaPhoenix AsiaDubai
AsiaManila EuropeDublin and EuropePrague
Currently the download servers host app versions:
app for registered customers vregcustappv
app for registered customers vregcustappv
app for registered customers vregcustappv
app for subscription customers vsubscappv
app for subscription customers vsubscappv
app for subscription customers vsubscappv
app for nonpaying customers vfreecustappv
app for nonpaying customers vfreecustappv
and app for nonpaying customers vfreecustappv
which was recently released.
A table belonging to user JAHERNA holds data about app downloads. That table
is named download. A table named customer is also created that contains
customer information from the customer registration process. There is sample
data in both tables.
Tasks through refer to the customer and download tables in the schema
belonging to user JAHERNA
Task Most Recent App Downloads
Write a command to retrieve which app was downloaded recently, that is in
Find out when is was downloaded and the name of the customer who downloaded it
In a separate command, compare the time zone offset value for your time zone to
the server time zone offset of the most recent downloaded app. A template for
the second command is provided.
select 'Central' as zone, tzoffsetAmericaChicago
from dual
union
select 'Most Recent App Download Zone' as zone,
tzoffsetThe Timezone of Your Command Result' from dual;
Task Time Zone Arithmetic
Subtract the most recent app download time from the current server time as a
timestamp with timezone value to see what the daytime difference is between
the two. In addition to the commands and output, write a sentence as a comment
to state what the data type of the difference you computed is
The data type of the result appears to be
Task More than One Download
Some customers have downloaded software more than once. Write a command to
retrieve customer ids for customers who have downloaded more than two times.
Hint: You need a group by clause and a having clause that uses the count function,
but you will not retrieve the count. Rather you will retrieve the customer id
Task Time Between Earliest and Latest Download for Customers with More
than Two Downloads
Write a query to compute the time between the earliest and latest download
times for customers with more than two downloads. Include the customer names
in the result set. Hint: Use the Task query as a subquery with a having
clause based on custid being in the result set of the Task query.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
