-- COMP3311 T2 2025 ass1.sql
--
-- Name: [Your Name]
-- Student ID: [zID]

----------------------------------------------------------------
CREATE OR REPLACE VIEW Q1(player, born) AS
SELECT
    -- your code here
;

----------------------------------------------------------------
CREATE OR REPLACE VIEW Q2(team, country, total_matches) AS
SELECT
    -- your code here
;

----------------------------------------------------------------
CREATE OR REPLACE VIEW Q3(player_id, player, goals_scored, first_goal_date) AS
SELECT
    -- your code here
;

----------------------------------------------------------------
CREATE OR REPLACE VIEW Q4(player_id, player, yellow_cards, red_cards, discipline_score)  AS
SELECT
    -- your code here
;

----------------------------------------------------------------
CREATE OR REPLACE VIEW Q5(match_id, home_team, away_team, goals_for_each_team) AS
SELECT
    -- your code here
;

----------------------------------------------------------------
CREATE OR REPLACE VIEW Q6(match_id, score, yellow, red) AS
SELECT
    -- your code here
;

----------------------------------------------------------------
CREATE OR REPLACE VIEW Q7(match_id, winning_team, halftime_score, fulltime_score) AS
SELECT
    -- your code here
;

----------------------------------------------------------------

CREATE OR REPLACE FUNCTION Q8(search_term text) RETURNS SETOF TEXT
LANGUAGE plpgsql AS $$
    -- your code here
$$;

----------------------------------------------------------------

CREATE OR REPLACE FUNCTION Q9(_match_id INTEGER) RETURNS TEXT
LANGUAGE plpgsql AS $$
    -- your code here
$$;
