@Flamefever

SQL Queries

June 11, 2021 · SQL
SELECT PA.PID, PA.pname, MAX(PL.score), AVG(PL.score)
FROM participant PA, played PL
WHERE PL.pid = PA.pid
    AND (SELECT *
        FROM played pl2
        WHERE count(pl2.pid) > 1)
        
SELECT pl.PID,  
FROM played pl 
WHERE pl.pid = pl2.pid and (SELECT pl2.PID, count(pl2.GID)
        FROM played pl2)

toets opdracht 1

updated June 11, 2021 · SQL
CREATE TABLE Branch (
    city CHAR(40),
    streetname CHAR(40),
    house_nr INTEGER,
    PRIMARY KEY (city,streetname)
);

CREATE TABLE duration (
    contractid INTEGER PRIMARY KEY,
    ending date,
    start date NOT null

Figuur 3

updated April 02, 2021 · SQL
CREATE TABLE Container (
    co_id INTEGER PRIMARY KEY,
    Content TEXT
);

CREATE TABLE Ship (
    s_id INTEGER PRIMARY KEY,
    s_name TEXT,
    created_at TEXT
);

Database opdracht 1

updated April 02, 2021 · SQL
-- create a table
CREATE TABLE Author (
a_id INTEGER PRIMARY KEY,
a_name TEXT,
a_age INTEGER
);

CREATE TABLE Document (
d_id INTEGER PRIMARY KEY,
DOI TEXT
);