Databases | SQL | Oracle | MS Access Answers

Questions answered by 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

Write a PL/SQL program to find odd or even number.

Write a PL/SQL program to find area and perimeter of rectangle.


Consider a relation Employee with following attributes:

Name Null Type

-------------------------------- ----------------------- -------------------------

EMPNO NOT NULL NUMBER(4)

ENAME VARCHAR2(10)

JOB VARCHAR2(9)

MGR NUMBER(4)

HIREDATE DATE

SAL NUMBER(7,2)

COMM NUMBER(7,2)

DEPTNO NUMBER(3)

AGE NUMBER(3)

ESAL NUMBER(10)

a. List minimum , maximum , average salaries of employee.

b. What is the difference between maximum and minimum salaries of employees in the organization?

c. Display all employee names and salary whose salary is greater than minimum salary of the company and job title starts with ‘M’.

d. Display total salary spent for each job category.

e. Display lowest paid employee details under each manager.


create table emp with attributes (eid number,ename varchar2(10),age number,salary number);

 


a. Count number of employee names from employee table.

b. Display the Sum of age employee table.

c. Find grouped salaries of employees (group by clause).

d. Find salaries of employee in Ascending Order (order by clause).

e. Find salaries of employee in Descending Order.



Create table EMP with the following description :Name TypeEMPNO NOT NULL NUMBER(4) ENAME VARCHAR2(10)JOB VARCHAR2(9) MGR NUMBER(4) HIREDATE DATE SAL NUMBER(7,2) COMM NUMBER(7,2) DEPTNO NUMBER(3)AGE NUMBER(3) ESAL NUMBER

a. Get the description EMP table.

b. List all employees details.

c. List all employee names and their salaries, whose salary lies between 1500/- and 3500/- both inclusive.

d. List all employee names and their and their manager whose manager is 7902 or 7566 0r 7789.

e. List all employees who belongs to the department 10 or 20.


Get all the potential users. Fetch the user_ids who liked at least 2 videos published by "Disney" channel, and who did not subscribe to the channel (channel_id = 352).


Note:

  • Consider reaction_type LIKE as liked.
  • Sort the output in the descending order of no_of_likes, and then in the ascending order of potential_user_id.

Expected Output Format

potential_user_id no_of_likes



Best time to upload a comedy video:

DunkFest channel is planning to upload a video in the "COMEDY" genre

Give the channel the best suitable hour of the day when users positively engage more with comedy videos.

Note:

  • Consider positive engagement as LIKE for the videos in the "COMEDY" genre_type.
  • Consider reaction_type LIKE as liked.
  • Return the hour in the integer format

Expected Output Format

hour_of_engagement no_of_likes5...


Get all the distinct user_ids who liked at least one video uploaded by Android Authority Channel (channel__id = 364) but didn't like the video uploaded by Tech savvy channel with video_id = 1005.

Note:

  • Consider reaction_type LIKE as liked
  • Sort the output in the ascending order of user_id.

Expected Output Format

user_id



Get the number of users who possitively engaged with at least one video of Disney Channel (channel_id = 352).

Note:

  • Consider possitive engagement as LIKE for a video uploaded by Disney channel.

Expected Output Format:

no_of_users_reached


Get the top 10 channels for which more number of users are subscribed in the year 2018.

Note:

In case, if the no_of_subscribers are same, then sort the output in the ascending order of channel_name.

Expected Output Format:

channel_id channel_name no_of_subscribers



LATEST TUTORIALS
APPROVED BY CLIENTS