Views

vwgameevents

Columns

Column
Alias
events.league
league
events.id
eventid
events.date
date
games.hometeam
hometeam
games.awayteam
awayteam
games.starttime
starttime
games.homescore
homescore
games.awayscore
awayscore
games.id
gameid
leagues.sport
sportid
leagues.id
leagueid
leagues.icon
leagueicon
sports.name
sportname
sports.icon
icon
sports.duration
duration
progress.status
status
status.name
name

Script

1
CREATE
2
ALGORITHM = UNDEFINED
3
DEFINER = `root`@`localhost`
4
SQL SECURITY DEFINER
5
VIEW `vwgameevents` AS
6
SELECT
7
`x`.`league` AS `league`,
8
`x`.`id` AS `eventid`,
9
`x`.`date` AS `date`,
10
CONCAT(`x`.`date`, ' ', `y`.`starttime`) AS `datetime`,
11
`y`.`hometeam` AS `hometeam`,
12
`y`.`awayteam` AS `awayteam`,
13
`y`.`starttime` AS `starttime`,
14
`y`.`homescore` AS `homescore`,
15
`y`.`awayscore` AS `awayscore`,
16
`y`.`id` AS `gameid`,
17
`z`.`sport` AS `sportid`,
18
`z`.`id` AS `leagueid`,
19
`z`.`icon` AS `leagueicon`,
20
`a`.`name` AS `sportname`,
21
`a`.`icon` AS `icon`,
22
`a`.`duration` AS `duration`,
23
`p`.`status` AS `status`,
24
`s`.`name` AS `name`
25
FROM
26
(((((`events` `x`
27
JOIN `games` `y` ON ((`y`.`event` = `x`.`id`)))
28
JOIN `leagues` `z` ON ((`x`.`league` = `z`.`name`)))
29
JOIN `sports` `a` ON ((`z`.`sport` = `a`.`id`)))
30
JOIN `progress` `p` ON ((`y`.`id` = `p`.`game`)))
31
JOIN `status` `s` ON ((`p`.`status` = `s`.`id`)))
32
ORDER BY `x`.`date` , `y`.`starttime`
Copied!

vwsports

Columns

Column
Alias
sports.id
id
sports.name
sportsname
sports.icon
sportsicon
leagues.name
leaguename
leagues.icon
leagueicon

Script

1
CREATE
2
ALGORITHM = UNDEFINED
3
DEFINER = `root`@`localhost`
4
SQL SECURITY DEFINER
5
VIEW `vwsports` AS
6
SELECT
7
`x`.`id` AS `id`,
8
`x`.`name` AS `sportsname`,
9
`x`.`icon` AS `sportsicon`,
10
`y`.`name` AS `leaguename`,
11
`y`.`icon` AS `leagueicon`
12
FROM
13
(`sports` `x`
14
JOIN `leagues` `y` ON ((`x`.`id` = `y`.`sport`)))
Copied!

vwteams

Columns

Column
Alias
teams.name
teamname
leagues.name
leaguename

Script

1
CREATE
2
ALGORITHM = UNDEFINED
3
DEFINER = `root`@`localhost`
4
SQL SECURITY DEFINER
5
VIEW `vwteams` AS
6
SELECT
7
`x`.`name` AS `teamname`,
8
`y`.`name` AS `leaguename`
9
FROM
10
(`teams` `x`
11
JOIN `leagues` `y` ON ((`x`.`league` = `y`.`id`)))
Copied!
Export as PDF
Copy link