• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 16:17
CET 22:17
KST 06:17
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
BGE Stara Zagora 2026 announced13[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3RSL Season 3: RO16 results & RO8 bracket13Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge2
StarCraft 2
General
BGE Stara Zagora 2026 announced Information Request Regarding Chinese Ladder SC: Evo Complete - Ranked Ladder OPEN ALPHA When will we find out if there are more tournament Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win
Tourneys
$5,000+ WardiTV 2025 Championship Constellation Cup - Main Event - Stellar Fest RSL Revival: Season 3 Tenacious Turtle Tussle [Alpha Pro Series] Nice vs Cure
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation
Brood War
General
FlaSh's Valkyrie Copium BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ A cwal.gg Extension - Easily keep track of anyone Which season is the best in ASL?
Tourneys
[Megathread] Daily Proleagues [BSL21] RO16 Group B - Sunday 21:00 CET [BSL21] RO16 Group C - Saturday 21:00 CET Small VOD Thread 2.0
Strategy
Game Theory for Starcraft How to stay on top of macro? Current Meta PvZ map balance
Other Games
General Games
Path of Exile Nintendo Switch Thread The Perfect Game Stormgate/Frost Giant Megathread Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread The Big Programming Thread Things Aren’t Peaceful in Palestine Artificial Intelligence Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread
Sports
Formula 1 Discussion 2024 - 2026 Football Thread NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Where to ask questions and add stream? The Automated Ban List
Blogs
Esports Earnings: Bigger Pri…
TrAiDoS
Thanks for the RSL
Hildegard
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2434 users

[H] Advanced mysql knowledge required

Blogs > s.a.y
Post a Reply
s.a.y
Profile Blog Joined October 2007
Croatia3840 Posts
April 29 2010 11:31 GMT
#1
Hello, i require some advanced mysql knowledge (which i am sure exists withing tl.net)

I am currently arranging the winnings page on tl.net wiki and updating takes quite a while. First time it took my about 4 hours.
Second time, i made the entire thing in ms excel, but it cut down the updating time to 2 hours, which is still too much.

After that, i made a database on my PC and it works (it has all the tournaments and players listed). Now i need a query that will combine it all so i can directly implement it into wiki.

So, i have two tables - players and tournaments.
Players table consists of pid (player id, unique), nick and others stuff.
Tournament table consists of tid (tournament id, unique), date, tourney name, winnings and pid (connection to the player table).

I managed to do simple queries to get info how much a single player won, or what's the total sum of winnings in tournaments.

Now, i need the complicated one. Query that would sort players by tournament winnings.

halp!

I am not good with quotes
FaCE_1
Profile Blog Joined December 2006
Canada6182 Posts
April 29 2010 12:09 GMT
#2
if no one is able to answer you before the week-end, I can try to do it. currently to much work to do at job T.T

i'll keep it in my fav and come back saturday to see if you had progress or not.
n_n
s.a.y
Profile Blog Joined October 2007
Croatia3840 Posts
April 29 2010 12:14 GMT
#3
On April 29 2010 21:09 FaCE_1 wrote:
if no one is able to answer you before the week-end, I can try to do it. currently to much work to do at job T.T

i'll keep it in my fav and come back saturday to see if you had progress or not.


thanks

much appreciated.
I am not good with quotes
IronWolf
Profile Blog Joined October 2009
South Africa315 Posts
April 29 2010 12:20 GMT
#4
select player.id, player.nick, player.name, tournament.id, tournament.name, sum(tournament.winnings) as totalwinnigsfortournament
from player inner join tournament
group by player.id, player.nick, player.name, tournament.id, tournament.name
order by totalwinnigsfortournament

Not too 100% on the order by...but it is something like that. If you send me a db dump/export i can debug that qry for you.
Shade692003
Profile Joined August 2005
Canada702 Posts
Last Edited: 2010-04-29 13:02:24
April 29 2010 12:46 GMT
#5
On April 29 2010 21:20 inforsomechop wrote:
select player.id, player.nick, player.name, tournament.id, tournament.name, sum(tournament.winnings) as totalwinnigsfortournament
from player inner join tournament
ON tournament.pid = player.pid
group by player.id, player.nick, player.name, tournament.id, tournament.name
order by totalwinnigsfortournament

Not too 100% on the order by...but it is something like that. If you send me a db dump/export i can debug that qry for you.


Edit: Also, keep in mind by doing a inner join you will not get players who has 0 winning. So if you want to rank every player, do a left join, and order by totalwinningsfortournament, player.name, player.nick
I hate the post below mine because it feels War3-ish.
IronWolf
Profile Blog Joined October 2009
South Africa315 Posts
April 29 2010 13:04 GMT
#6
agreed - thanks for fixing that.
s.a.y
Profile Blog Joined October 2007
Croatia3840 Posts
April 29 2010 14:52 GMT
#7
doesn't work the way i wanted.

Now it displays the single largest winnings by a player on a single tournament and sorts by it, not the total sum of a player.



+ Show Spoiler +

pid nick tid name ukupno
10 HayprO 22 CraftCup EU 50
3 Dimaga 27 Craft Cup EU 50
12 HuK 29 Craft Cup US 50
12 HuK 30 Craft Cup US 50
1 LucifroN 35 GosuCup Invitational 2nd 50
9 Nazgul 36 GosuCup Invitational 3rd 50
9 Nazgul 43 TeamLiquid SC2 Invitational 3rd 50
3 Dimaga 1 Zotac cup 135
3 Dimaga 3 Zotac Cup 135
6 DeMusliM 4 Zotac Cup 135
10 HayprO 5 Zotac Cup 135
9 Nazgul 9 Bescene Benelux 135
3 Dimaga 12 SC2TV.ru Invitational 1 135
3 Dimaga 13 SC2TV.ru Invitational 2 135
5 White-Ra 20 Go4SC2 ESL Saturday 135
11 TheLittleOne 31 Go4SC2 ESL Saturday 135
6 DeMusliM 33 Go4SC2 ESL Saturday 135
10 HayprO 34 GosuCup Invitational 1st 150
11 TheLittleOne 42 TeamLiquid SC2 Invitational 2nd 150
5 White-Ra 49 Assem vs White-Ra showmatch 150
4 Machine 47 Huk vs Machine Showmatch 200
1 LucifroN 11 ESL TV Pro Invite Cup 270
5 White-Ra 10 TeamLiquid SC2 Invitational 1 300
4 Machine 40 Hello, Goodbye 2nd 300
2 Idra 8 Hello, Goodbye 1st 550
1 LucifroN 18 Go4SC2 ESL March Finals 680


That's the result i get now.
I am not good with quotes
tarpman
Profile Joined February 2009
Canada719 Posts
Last Edited: 2010-04-29 15:01:36
April 29 2010 14:58 GMT
#8
You probably want a cross join rather than an inner or left join, so that every combination of player and tournament gets represented in the result. Otherwise the above query seems OK.

BTW this isn't really "advanced", nor is it MySQL specific...

EDIT: er. what I meant was "select from player, tournament" rather than using an explicit JOIN... forgot that cross join is in fact an SQL command... >_>
Saving the world, one kilobyte at a time.
s.a.y
Profile Blog Joined October 2007
Croatia3840 Posts
April 29 2010 15:06 GMT
#9
On April 29 2010 23:58 tarpman wrote:
You probably want a cross join rather than an inner or left join, so that every combination of player and tournament gets represented in the result. Otherwise the above query seems OK.

BTW this isn't really "advanced", nor is it MySQL specific...

EDIT: er. what I meant was "select from player, tournament" rather than using an explicit JOIN... forgot that cross join is in fact an SQL command... >_>


replacing inner join with cross join doesn't help either
I am not good with quotes
Shade692003
Profile Joined August 2005
Canada702 Posts
April 29 2010 15:25 GMT
#10
Maybe it's your table logic? This should be a 0.N 0.N relation, which means there should be an "intersection" table to link a specific player to a specific tournament, no?
I hate the post below mine because it feels War3-ish.
s.a.y
Profile Blog Joined October 2007
Croatia3840 Posts
April 29 2010 15:32 GMT
#11
not sure. Tables are quite simple, in 2NF format.

here's the sql code that i exported (data is not complete, still got some players missing)

+ Show Spoiler +

-- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 29, 2010 at 03:31 PM
-- Server version: 5.1.36
-- PHP Version: 5.3.0

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `win`
--

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

--
-- Table structure for table `player`
--

CREATE TABLE IF NOT EXISTS `player` (
`pid` int(11) NOT NULL AUTO_INCREMENT,
`nick` text NOT NULL,
`country` text NOT NULL,
`server` enum('EU','NA','Asia') NOT NULL,
`race` enum('p','z','t','r') NOT NULL,
UNIQUE KEY `pid` (`pid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ;

--
-- Dumping data for table `player`
--

INSERT INTO `player` (`pid`, `nick`, `country`, `server`, `race`) VALUES
(5, 'White-Ra', 'Ukraine', 'EU', 'p'),
(1, 'LucifroN', 'Spain', 'EU', 't'),
(2, 'Idra', 'USA', 'NA', 'z'),
(3, 'Dimaga', 'Ukraine', 'EU', 'p'),
(4, 'Machine', 'USA', 'NA', 'z'),
(6, 'DeMusliM', 'UK', 'EU', 't'),
(7, 'GoOdy', 'Germany', 'EU', 'p'),
(9, 'Nazgul', 'Netherlands', 'EU', 'p'),
(10, 'HayprO', 'Sweden', 'EU', 'z'),
(11, 'TheLittleOne', 'Germany', 'EU', 'r'),
(12, 'HuK', 'Australia', 'NA', 'p');

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

--
-- Table structure for table `tournament`
--

CREATE TABLE IF NOT EXISTS `tournament` (
`tid` int(11) NOT NULL AUTO_INCREMENT,
`date` date NOT NULL,
`name` text NOT NULL,
`prize_money` decimal(10,0) NOT NULL,
`winner` text NOT NULL,
`second` text NOT NULL,
`pid` int(11) NOT NULL,
PRIMARY KEY (`tid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=50 ;

--
-- Dumping data for table `tournament`
--

INSERT INTO `tournament` (`tid`, `date`, `name`, `prize_money`, `winner`, `second`, `pid`) VALUES
(1, '2010-02-28', 'Zotac cup', '135', 'Dimaga', '', 3),
(2, '2010-03-07', 'Zotac Cup', '135', 'Orly', '', 0),
(3, '2010-03-14', 'Zotac Cup', '135', 'Dimaga', '', 3),
(4, '2010-03-21', 'Zotac Cup', '135', 'DeMusliM', '', 6),
(5, '2010-03-28', 'Zotac Cup', '135', 'HayprO', '', 10),
(6, '2010-04-04', 'Zotac Cup', '135', 'GoOdy', '', 0),
(7, '2010-04-11', 'Zotac Cup', '135', 'Mana', '', 0),
(8, '2010-04-10', 'Hello, Goodbye 1st', '550', 'Idra', '', 2),
(9, '2010-04-10', 'Bescene Benelux', '135', 'Nazgul', '', 9),
(10, '2010-03-27', 'TeamLiquid SC2 Invitational 1', '300', 'White-Ra', '', 5),
(11, '2010-04-19', 'ESL TV Pro Invite Cup', '270', 'LucifroN', '', 1),
(12, '2010-02-27', 'SC2TV.ru Invitational 1', '135', 'Dimaga', '', 3),
(13, '2010-03-15', 'SC2TV.ru Invitational 2', '135', 'Dimaga', '', 3),
(14, '2010-03-13', 'PlayXP Weekly Tournament', '135', 'Check', 'ZenioWeRRa', 0),
(15, '2010-03-20', 'PlayXP Weekly Tournament', '135', 'AnyPro', '', 0),
(16, '2010-03-27', 'PlayXP Weekly Tournament', '45', 'Lui', '', 0),
(17, '2010-04-10', 'CraftCup (US)', '50', 'Levin', '', 0),
(18, '2010-03-27', 'Go4SC2 ESL March Finals', '680', 'LucifroN', '', 1),
(19, '2010-04-10', 'Go4SC2 ESL Saturday', '135', 'Mardow', '', 0),
(20, '2010-04-03', 'Go4SC2 ESL Saturday', '135', 'White-Ra', '', 5),
(21, '2010-03-20', 'CraftCup EU', '100', 'Morrow', '', 0),
(22, '2010-04-09', 'CraftCup EU', '50', 'HayprO', '', 10),
(23, '2010-04-25', 'Zotac Cup', '135', 'NaNi', '', 0),
(25, '2010-04-18', 'Zotac Cup', '135', 'Zpux', '', 0),
(26, '2010-04-25', 'Zotac Cup', '135', 'NaNi', '', 0),
(27, '2010-04-16', 'Craft Cup EU', '50', 'Dimaga', '', 3),
(29, '2010-04-22', 'Craft Cup US', '50', 'HuK', '', 12),
(30, '2010-04-11', 'Craft Cup US', '50', 'HuK', '', 12),
(31, '2010-04-19', 'Go4SC2 ESL Saturday', '135', 'TheLittleOne', '', 11),
(33, '2010-04-26', 'Go4SC2 ESL Saturday', '135', 'DeMusliM', '', 6),
(34, '2010-04-25', 'GosuCup Invitational 1st', '150', 'HayprO', '', 10),
(35, '2010-04-25', 'GosuCup Invitational 2nd', '50', 'LucifroN', '', 1),
(36, '2010-04-25', 'GosuCup Invitational 3rd', '50', 'Nazgul', '', 9),
(44, '2010-04-10', 'Hello, Goodbye 3rd', '175', 'iNkA', '', 0),
(40, '2010-04-10', 'Hello, Goodbye 2nd', '300', 'Machine', '', 4),
(41, '2010-04-10', 'Hello, Goodbye 4th', '80', 'Ruthless', '', 0),
(42, '2010-03-27', 'TeamLiquid SC2 Invitational 2nd', '150', 'TheLittleOne', '', 11),
(43, '2010-03-27', 'TeamLiquid SC2 Invitational 3rd', '50', 'Nazgul', '', 9),
(45, '2010-04-16', 'Gosucoaching weekly', '100', 'Sheth', '', 0),
(47, '2010-04-16', 'Huk vs Machine Showmatch', '200', 'Machine', '', 4),
(49, '2010-04-21', 'Assem vs White-Ra showmatch', '150', 'White-Ra', '', 5);
I am not good with quotes
Shade692003
Profile Joined August 2005
Canada702 Posts
Last Edited: 2010-04-29 15:55:44
April 29 2010 15:47 GMT
#12
oh nevermind, the playerid is the winning player, so it's ok, I thought it was supposed to link every players that played in a tournament, which would have been a 0.n 0.n relationship. Also, you should specify that the pid is a foreign key. (but that won't solve the issue anyway)

What you probably want is a count(tournament.pid)

Edit: maybe something like

select player.nick, count(tournament.pid) as NumberOfWins
from player left join tournament
on tournament.pid = player.pid
group by player.nick
order by count(tournament.pid), player.nick
I hate the post below mine because it feels War3-ish.
s.a.y
Profile Blog Joined October 2007
Croatia3840 Posts
April 29 2010 15:58 GMT
#13
On April 30 2010 00:47 Shade692003 wrote:
oh nevermind, the playerid is the winning player, so it's ok, I thought it was supposed to link every players that played in a tournament, which would have been a 0.n 0.n relationship. Also, you should specify that the pid is a foreign key. (but that won't solve the issue anyway)

What you probably want is a count(tournament.pid)

Edit: maybe something like

select player.nick, count(tournament.pid) as NumberOfWins
from player left join tournament
on tournament.pid = player.pid
group by player.nick
order by count(tournament.pid), player.nick


doesn't help either. something is broken, and i don't know what it is. sum should stay, as i need the sum of player.pid=tournament.pid not count (then it would count the number of tournaments where a player won some money, not the ammount)
I am not good with quotes
s.a.y
Profile Blog Joined October 2007
Croatia3840 Posts
Last Edited: 2010-04-29 16:03:19
April 29 2010 15:59 GMT
#14
On April 30 2010 00:47 Shade692003 wrote:
oh nevermind, the playerid is the winning player, so it's ok, I thought it was supposed to link every players that played in a tournament, which would have been a 0.n 0.n relationship. Also, you should specify that the pid is a foreign key. (but that won't solve the issue anyway)

What you probably want is a count(tournament.pid)

Edit: maybe something like

select player.nick, count(tournament.pid) as NumberOfWins
from player left join tournament
on tournament.pid = player.pid
group by player.nick
order by count(tournament.pid), player.nick


that second part is very good, but it counts wins, just needs a extra touch to count money not number of appearances.

EDIT: got it to work, replaced count(tournament.pid) with sum(tournament.prize_money)

thank YOU very much for helping me out!

I am not good with quotes
Flaccid
Profile Blog Joined August 2006
8853 Posts
Last Edited: 2010-04-29 16:07:32
April 29 2010 16:04 GMT
#15
This works:

SELECT p.pid, p.nick, SUM(t.winnings) AS sumwinnings FROM players AS p INNER JOIN tournaments AS t ON p.pid=t.pid GROUP BY p.pid, p.nick ORDER BY sumwinnings DESC

or

SELECT p.pid, p.nick, SUM(t.winnings) AS sumwinnings FROM players AS p LEFT JOIN tournaments AS t ON p.pid=t.pid GROUP BY p.pid, p.nick ORDER BY sumwinnings DESC

if you want players with null winnings as well.

I just tested it and it should work.

edit: nvm, you already got your answer.
I'd rather have a bottle in front of me than a frontal lobotomy
s.a.y
Profile Blog Joined October 2007
Croatia3840 Posts
April 29 2010 16:09 GMT
#16
On April 30 2010 01:04 Flaccid wrote:
This works:

SELECT p.pid, p.nick, SUM(t.winnings) AS sumwinnings FROM players AS p INNER JOIN tournaments AS t ON p.pid=t.pid GROUP BY p.pid, p.nick ORDER BY sumwinnings DESC

or

SELECT p.pid, p.nick, SUM(t.winnings) AS sumwinnings FROM players AS p LEFT JOIN tournaments AS t ON p.pid=t.pid GROUP BY p.pid, p.nick ORDER BY sumwinnings DESC

if you want players with null winnings as well.

I just tested it and it should work.

edit: nvm, you already got your answer.


yeah thanks, that works also

gogo TL.net

I am not good with quotes
Shade692003
Profile Joined August 2005
Canada702 Posts
April 29 2010 16:17 GMT
#17
Oh sorry by tournament winnings I was thinking of that ; wins not money :S Silly me yeah sum from the money column obviously is the way to go lol.
I hate the post below mine because it feels War3-ish.
Please log in or register to reply.
Live Events Refresh
BSL 21
20:00
RO16: Group B
Hawk vs Kyrie
spx vs Cross
ZZZero.O237
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 649
JuggernautJason86
StarCraft: Brood War
Calm 3829
Shuttle 568
ZZZero.O 237
Dewaltoss 153
sas.Sziky 77
hero 72
Mong 45
Dota 2
syndereN514
Other Games
Grubby7500
B2W.Neo703
Mlord579
mouzStarbuck173
ArmadaUGS140
QueenE44
Organizations
Other Games
gamesdonequick6991
EGCTV2024
BasetradeTV114
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• StrangeGG 68
• HeavenSC 50
• IndyKCrew
• Migwel
• AfreecaTV YouTube
• intothetv
• Kozan
• sooper7s
• LaughNgamezSOOP
StarCraft: Brood War
• Airneanach15
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• Ler140
• Noizen42
Other Games
• imaqtpie1846
• WagamamaTV401
• Shiphtur347
Upcoming Events
Replay Cast
11h 43m
Wardi Open
14h 43m
Monday Night Weeklies
19h 43m
StarCraft2.fi
19h 43m
Replay Cast
1d 2h
Wardi Open
1d 14h
StarCraft2.fi
1d 19h
PiGosaur Monday
2 days
Wardi Open
2 days
StarCraft2.fi
2 days
[ Show More ]
Replay Cast
3 days
The PondCast
3 days
Replay Cast
4 days
Korean StarCraft League
5 days
CranKy Ducklings
5 days
SC Evo League
5 days
BSL 21
5 days
Sziky vs OyAji
Gypsy vs eOnzErG
Sparkling Tuna Cup
6 days
BSL 21
6 days
Bonyth vs StRyKeR
Tarson vs Dandy
Liquipedia Results

Completed

Proleague 2025-11-28
RSL Revival: Season 3
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
CSCL: Masked Kings S3
Slon Tour Season 2
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
Kuram Kup
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.