Databases | SQL | Oracle | MS Access Answers

Questions: 641

Answers by our Experts: 641

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

5. Write a query that will return all the rentals placed between the following dates “2021-08-

01” AND “2021-10-30”.

6. Write a query that selects all the rentals placed by Bud Barnes.

7. Write a query that displays all the returns for the car make Toyota.

21; 22; 23 2022

© The Independent Institute of Education (Pty) Ltd 2022

Page 11 of 14

8. Write a query that counts the number of rentals that were placed for the car make

Hyundai.

9. Write a query to update the Model of the car with the CarNo FOR001 from “Fiesta” to

“Focus”.

10. Write a query that will display the CarNo, Driver Name, Rental Fee, Start Date, End Date

and Availability of all available rentals.

11. Write a query that will show a list of the available car makes in the database use the

DISTINCT command.



Get the distinct ids of videos that belong to the following genres.



genre_id genre


201 Comedy


202 Action


203 Thriller


211 Scifi


Note:


Sort the output in the descending order ofvideo_id




Expected Output Format



video_id




Please help

This is the code for Getting all the channel_ids that uploaded at least one video in "AI/ML" or "Robotics" technologies between 2018 and 2021.




SELECT


DISTINCT channel_id


FROM


video


WHERE


video_id >= 1


AND name LIKE '%AI/ML%'


OR name LIKE '%Robotics%'


AND strftime('%Y', published_datetime) BETWEEN "2018"


AND "2021"


GROUP BY


channel_id


ORDER BY


channel_id ASC;




Output Table:


channel_id 351 353 364 365 377



But,


How can I Get all the channel_ids that uploaded at least 20 videos in "AI/ML", "Cyber Security", "Data Science" or "Robotics" technologies between 2018 and 2021.


Example: If a channel publishes 5 videos in AI/ML, 10 videos in Cyber Security and 5 videos in Data Science, consider the channel




the table data is very huge so, I cant send the complete table data.


please help me.


which of the following is the reference data type ?

Select one:

a. array

b. int

c. short

d. double


1.1 State the five main steps of the DBLC.

1.2 For each step stated above in Question 1.1. State and explain the activities that are done for each step.


Write a Java program to print "hello" on the screen and write your name on the separate line?

Of the data type text, number, or yes/no which would be the appropriate for a phone number field that need to store data in the format (123)555-7890? Explain your answer.



ii) Write an SQL query that returns the titles of articles authored by 'Robert Tarjan'.



b) Consider the relations Authors(auID,name) and Authoring(articleID,authorID), containing

information on names of authors, and who is authoring which papers, respectively.

i) Write an SQL query that returns for each article, its ID, title and the number of authors.

ii) Write an SQL query that returns the titles of articles authored by 'Robert Tarjan'.

iii) Write an SQL query that returns the number of co-authors of 'Robert Tarjan'. (I.e., the number of

authors who have written at least one article together with him.)


b) Consider the relations Authors(auID,name) and Authoring(articleID,authorID), containing

information on names of authors, and who is authoring which papers, respectively.

i) Write an SQL query that returns for each article, its ID, title and the number of authors.

ii) Write an SQL query that returns the titles of articles authored by 'Robert Tarjan'.

iii) Write an SQL query that returns the number of co-authors of 'Robert Tarjan'. (I.e., the number of

authors who have written at least one article together with him.)


LATEST TUTORIALS
APPROVED BY CLIENTS