R

@R3Z8

Subqueries: Databases for Developers

SQL
3 years ago
-- https://livesql.oracle.com/apex/livesql/file/tutorial_GMLYIBY74FPBS888XO8F1R95I.html create table bricks ( brick_id integer, colour varchar2(10) ); create table colours ( colour_name varchar2(10), minimum_bricks_needed integer

1050. Actors and Directors Who Cooperated At Least Three Times

SQL
3 years ago
-- create a table CREATE TABLE ActorDirector ( actor_id INTEGER, director_id INTEGER, timestamp INTEGER, CONSTRAINT PK_timestamp PRIMARY KEY (timestamp) ); -- insert some values INSERT INTO ActorDirector VALUES (1, 1, 0); INSERT INTO ActorDirector VALUES (1, 1, 1);

620. Not Boring Movies

SQL
3 years ago
/* Write your PL/SQL query statement below */ -- create a table CREATE TABLE Cinema ( id INT, movie VARCHAR, description VARCHAR, rating FLOAT, CONSTRAINT PK_id PRIMARY KEY (id)

607. Sales Person

SQL
3 years ago
/* Write your PL/SQL query statement below */ -- create a table CREATE TABLE SalesPerson ( sales_id INT, name VARCHAR, salary INT, commission_rate INT, hire_date DATE, CONSTRAINT PK_STUDENT PRIMARY KEY (sales_id)

176. Second Highest Salary

SQL
3 years ago
/* Write your PL/SQL query statement below */ -- create a table CREATE TABLE Employee ( id INT, salary INT, CONSTRAINT PK_STUDENT PRIMARY KEY (id) ); -- insert some values

181. Employees Earning More Than Their Managers

SQL
3 years ago
/* Write your PL/SQL query statement below */ -- create a table CREATE TABLE Employee ( id INT, name VARCHAR, salary INT, managerId INT, CONSTRAINT PK_STUDENT PRIMARY KEY (id)

First Login

SQL
3 years ago
-- create a table CREATE TABLE ACTIVITY ( player_id INT, event_date DATE, device_id INT NOT NULL, games_played INT NOT NULL, CONSTRAINT PK_Person PRIMARY KEY (player_id, event_date) ); -- insert some values

596. Classes More Than 5 Students

SQL
3 years ago
/* Write your PL/SQL query statement below */ -- create a table CREATE TABLE Courses ( student VARCHAR2, class VARCHAR2, CONSTRAINT PK_STUDENT PRIMARY KEY (student, class) ); -- insert some values

511. Game Play Analysis I

SQL
3 years ago
-- create a table CREATE TABLE ACTIVITY ( player_id INT, event_date DATE, device_id INT NOT NULL, games_played INT NOT NULL, CONSTRAINT PK_Person PRIMARY KEY (player_id, event_date) ); -- insert some values