Fourth Quiz

Fourth Quiz

Professional Development

18 Qs

quiz-placeholder

Similar activities

JSKBS - Database Management System

JSKBS - Database Management System

Professional Development

15 Qs

Mapeamento e Normalização BD

Mapeamento e Normalização BD

University - Professional Development

15 Qs

Python - List (metods)

Python - List (metods)

Professional Development

20 Qs

Introduction to Machine Learning

Introduction to Machine Learning

University - Professional Development

20 Qs

Microsoft Excel

Microsoft Excel

KG - Professional Development

20 Qs

Salesforce Developer

Salesforce Developer

Professional Development

20 Qs

วิชาการเขียนโปรแกรมภาษา Pyhton รหัส 32201

วิชาการเขียนโปรแกรมภาษา Pyhton รหัส 32201

Professional Development

20 Qs

Quiz Evaluasi 1 Mapel DPJK

Quiz Evaluasi 1 Mapel DPJK

Professional Development

15 Qs

Fourth Quiz

Fourth Quiz

Assessment

Quiz

Computers

Professional Development

Practice Problem

Hard

Created by

Arbias Gashi

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following query return?
SELECT Name, Price

FROM Products

WHERE ProductTypeId = -1;

All product names and prices where the brand is Adidas.

All product names and prices where the product type is Shoes.

All product names and prices where the product price is less than 1.

An error because ProductTypeId is negative.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the ORDER BY Price DESC clause in the following query?

SELECT Name, Price

FROM Products

WHERE Price > 5000

ORDER BY Price DESC;

Sort the products by name in descending order.

Sort the products by price in ascending order.

Sort the products by price in descending order.

Remove duplicates from the result.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following query return?

SELECT COUNT(*) AS TotalProducts

FROM Products;

The total number of rows in the Products table.

The number of distinct products in the Products table.

The total price of all products in the Products table.

The total number of columns in the Products table.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the following query?

SELECT

pb.Name AS BrandName,

SUM(p.Price) AS TotalPrice

FROM Products p

INNER JOIN ProductBrands pb ON p.ProductBrandId = pb.Id

GROUP BY pb.Name;

Retrieve the total number of products for each brand.

Retrieve the total price of products for each brand.

Retrieve the most expensive product for each brand.

Retrieve all product brands with no associated products.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following query return?

SELECT p.Name AS ProductName, pb.Name AS BrandName FROM Products p INNER JOIN ProductBrands pb ON p.ProductBrandId = pb.Id WHERE p.Name LIKE '%Tennis%';

All products with names containing "Tennis" and their brand names.

All products with brand names containing "Tennis".

All products with names starting with "Tennis".

All products priced above 5000 with brand names containing "Tennis".

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the LEFT JOIN clause do in this query?

SELECT

pb.Name AS BrandName,

COALESCE(SUM(p.Price), 0) AS TotalPrice

FROM ProductBrands pb

LEFT JOIN Products p ON pb.Id = p.ProductBrandId

GROUP BY pb.Name;

Includes only brands that have associated products.

Excludes brands that have no associated products.

Includes all brands, even those without associated products.

Includes only brands where the total price is not null.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following query return?

SELECT

pt.Name AS ProductTypeName,

COALESCE(COUNT(p.Id), 0) AS TotalProducts

FROM ProductTypes pt

RIGHT JOIN Products p ON pt.Id = p.ProductTypeId

GROUP BY pt.Name;

All product types and their total products, even if a type has no products.

All product types and their total products, only if a type has at least one product.

Only product types with no products.

All product types and products, even if they do not match.

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?