1 Crore+ students have signed up on EduRev. Have you? Download the App |
Which normal form deals with the elimination of transitive dependencies?
Which of the following is not a benefit of using a relational database?
Which of the following is not a part of the database design process?
Consider the following SQL code:
CREATE TABLE employees (
emp_id INT PRIMARY KEY,
emp_name VARCHAR(50),
salary DECIMAL(10, 2)
);
INSERT INTO employees (emp_id, emp_name, salary)
VALUES (1, 'John Doe', 5000.00);
SELECT emp_name FROM employees;
What will be the output of the SELECT statement?
Consider the following SQL code:
CREATE TABLE customers (
cust_id INT PRIMARY KEY,
cust_name VARCHAR(50),
city VARCHAR(50)
);
INSERT INTO customers (cust_id, cust_name, city)
VALUES (1, 'Alice Smith', 'New York');
SELECT * FROM customers;
Consider the following SQL code:
CREATE TABLE orders (
order_id INT PRIMARY KEY,
cust_id INT,
order_date DATE
);
INSERT INTO orders (order_id, cust_id, order_date)
VALUES (1, 1, '2023-05-01');
SELECT cust_id FROM orders WHERE order_date = '2023-05-01';
What will be the output of the SELECT statement?
Consider the following SQL code:
CREATE TABLE products (
prod_id INT PRIMARY KEY,
prod_name VARCHAR(50),
price DECIMAL(10, 2)
);
INSERT INTO products (prod_id, prod_name, price)
VALUES (1, 'iPhone', 999.99),
(2, 'Samsung Galaxy', 799.99),
(3, 'Google Pixel', 699.99);
SELECT COUNT(*) FROM products;
What will be the output of the SELECT statement?
Consider the following SQL code:
CREATE TABLE employees (
emp_id INT PRIMARY KEY,
emp_name VARCHAR(50),
salary DECIMAL(10, 2)
);
INSERT INTO employees (emp_id, emp_name, salary)
VALUES (1, 'John Doe', 5000.00);
SELECT COUNT(*) FROM employees WHERE salary > 10000.00;
What will be the output of the SELECT statement?
Consider the following SQL code:
CREATE TABLE students (
student_id INT PRIMARY KEY,
student_name VARCHAR(50),
marks INT
);
INSERT INTO students (student_id, student_name, marks)
VALUES (1, 'Alice', 85),
(2, 'Bob', 92),
(3, 'Charlie', 78);
SELECT student_name FROM students WHERE marks > 80;
What will be the output of the SELECT statement?
Consider the following SQL code:
CREATE TABLE books (
book_id INT PRIMARY KEY,
book_name VARCHAR(50),
author VARCHAR(50),
price DECIMAL(10, 2)
);
INSERT INTO books (book_id, book_name, author, price)
VALUES (1, 'Book1', 'Author1', 10.99),
(2, 'Book2', 'Author2', 20.99),
(3, 'Book3', 'Author1', 15.99);
SELECT COUNT(DISTINCT author) FROM books;
What will be the output of the SELECT statement?
Consider the following SQL code:
CREATE TABLE orders (
order_id INT PRIMARY KEY,
order_date DATE,
total_amount DECIMAL(10, 2)
);
INSERT INTO orders (order_id, order_date, total_amount)
VALUES (1, '2023-01-01', 100.00),
(2, '2023-01-02', 200.00),
(3, '2023-01-03', 300.00);
SELECT SUM(total_amount) FROM orders;
What will be the output of the SELECT statement?
Consider the following SQL code:
CREATE TABLE products (
prod_id INT PRIMARY KEY,
prod_name VARCHAR(50),
price DECIMAL(10, 2)
);
INSERT INTO products (prod_id, prod_name, price)
VALUES (1, 'Product1', 10.00),
(2, 'Product2', 20.00),
(3, 'Product3', 30.00);
SELECT AVG(price) FROM products;
What will be the output of the SELECT statement?
Consider the following SQL code:
CREATE TABLE students (
student_id INT PRIMARY KEY,
student_name VARCHAR(50),
marks INT
);
INSERT INTO students (student_id, student_name, marks)
VALUES (1, 'Alice', 80),
(2, 'Bob', 85),
(3, 'Charlie', 90);
SELECT student_name FROM students ORDER BY marks DESC LIMIT 2;
What will be the output of the SELECT statement?
75 videos|44 docs
|
75 videos|44 docs
|