Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
11 views1 page

SELECT SQL (AutoRecovered)

The document contains SQL queries related to a database of film locations in San Francisco, detailing various attributes such as title, release year, and production companies. It includes specific queries to select and filter data based on conditions like release year and writer. Additionally, it demonstrates how to count distinct release years and limit results in queries.

Uploaded by

Messo Francis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

SELECT SQL (AutoRecovered)

The document contains SQL queries related to a database of film locations in San Francisco, detailing various attributes such as title, release year, and production companies. It includes specific queries to select and filter data based on conditions like release year and writer. Additionally, it demonstrates how to count distinct release years and limit results in queries.

Uploaded by

Messo Francis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

2152670e59fdc21321def9899bc549ca

SELECT column1, column2, ...

FROM table_name

WHERE condition

FilmLocations(

Title: titles of the films,

ReleaseYear: time of public release of the films,

Locations: locations of San Francisco where the films were shot,

FunFacts: funny facts about the filming locations,

ProductionCompany: companies who produced the films,

Distributor: companies who distributed the films,

Director: people who directed the films,

Writer: people who wrote the films,

Actor1: person 1 who acted in the films,

Actor2: person 2 who acted in the films,

Actor3: person 3 who acted in the films

SELECT Title, Director, Writer FROM FilmLocations;

SELECT Title, ReleaseYear, Locations FROM FilmLocations WHERE ReleaseYear>=2001;

SELECT Title, ProductionCompany, Locations, ReleaseYear FROM FilmLocations WHERE Writer<>"James


Cameron";

SELECT DISTINCT Title FROM FilmLocations;

SELECT COUNT(DISTINCT ReleaseYear) FROM FilmLocations WHERE ProductionCompany="Warner Bros.


Pictures";

SELECT * FROM FilmLocations LIMIT 15 OFFSET 10;

SELECT DISTINCT Title FROM FilmLocations WHERE ReleaseYear=2015 LIMIT 3 OFFSET 5;


select EMP_ID, DEP_NAME from employees E, departments D where E.DEP_ID =
D.DEPT_ID_DEP;

You might also like