Information Management

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/33

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

34 Terms

1
New cards

MAX

What group function is used to return the maximum value ignoring nulls?

2
New cards

JOIN

This type of JOIN clause is based on all columns in the two tables that have the same name. It selects rows from the two tables that have equal values in all matched columns. Which of the following refers to the given statement?

3
New cards

SELECT AVG(salary), department_id FROM Employees GROUP BY department_id;

The HR wants to retrieve the information of the employee’s average salary from each department. Display the average salary and department id. Which of the following SQL statements below satisfies the condition?

4
New cards

Subquery

It is an inner query that is nested within an outer query.

5
New cards

MIN

What group function is used to return minimum value ignoring nulls?

6
New cards

Single-row

Which type of inner query returns only one row to the outer query?

7
New cards

Cross

What type of join returns the Cartesian product from two tables?

8
New cards

SELECT SUM(salary) FROM f_staffs WHERE id IN(12, 9);

Find the sum of the salaries for Global Fast Foods staff members whose IDs are 12 and 9. Select the correct SQL statement below.

9
New cards

SUM

What function is used to calculate the sum ignoring null values?

10
New cards

ON

The use of ______ clause allows a natural join based on an arbitrary condition or two columns with different names.

11
New cards

Alias

It is used to give a table another name to simplify queries and improve performance

12
New cards

Full Outer

Performs a join on two tables, retrieves all the rows in the Left table, even if there is no match in the Right table. It also retrieves all the rows in the Right table, even if there is no match in the Left table.

13
New cards

Equijoin

The values in a column in one table are equal to a value in another table is what type of join?

14
New cards

SELECT AVG(MAX(salary)) FROM Employees GROUP BY job_id;

SQL statement that displays the maximum average salary?

15
New cards

Outer

What type of join returns the unmatched rows as well as matched rows?

16
New cards

MAX and MIN

Which of the following group functions can be used for numeric, character and date data types?

17
New cards

USING

It is use to perform an equijoin based on one specified column name.

18
New cards

SELECT department_id, COUNT(last_name) FROM employees GROUP BY department_id;

You write a query that will display the number of employees from each department but your query (below) encounters an error ‘ORA-00937: not a single-group function’. Which of the following SQL statements will solve this error?

SELECT department_id, count (last_name) FROM employees;


19
New cards

Right

aA type of outer join performs a join on two tables, retrieves all the rows in the Right table even if there is no match in the Left table?

20
New cards

Outer Query

It accepts a value from the inner query to complete its SELECT statement.

21
New cards

SELECT l.city, d.department_name FROM locations l JOIN departments d USING (location_id)

SQL statement to join the Oracle database locations and departments table using the location_id column?

22
New cards

Join condition containing something other than an equality operator

What condition requires the creation of a non-equijoin?

23
New cards

IN

The _____ operator is used within the outer query WHERE clause to select only those rows which are IN the list of values returned from the inner query.

24
New cards

GROUP BY

Which of the following clause specifies how rows must be grouped?

25
New cards

SELECT COUNT(*) FROM d_songs;

What correct SQL statement will give us information about how many songs are listed in the DJs on Demand D_SONGS table?

26
New cards

COUNT = 4 DISTINCT = 3

What values will be returned when the statement below is issued? Based on the given data sets and SQL statement below.

SELECT COUNT(shoe_color), COUNT(DISTINCT shoe_color) FROM shoes;

<p><span>What values will be returned when the statement below is issued? Based on the given data sets and SQL statement below.</span><br><br><span>SELECT COUNT(shoe_color), COUNT(DISTINCT shoe_color) FROM shoes;</span></p>
27
New cards

Distinct

What keyword is used to return only non-duplicate values or combinations of non-duplicate values in a query?

28
New cards

Single-row

Which type of inner query returns only one row to the outer query?

29
New cards

Alias

It is used to give a table another name to simplify queries and improve performance

30
New cards

>

Select the correct multiple-row comparison operators in the outer query WHERE clause of each of the following: 

Which employees have salaries more than the average salary of Abel?

WHERE salary __________(SELECT salary ...

31
New cards
32
New cards
33
New cards
34
New cards