I understand that this question is both vague and broad. But I'm in need of a correlated subquery. I'm having great difficulty in understanding the difference between the two and I'm wondering if the query below would be uncorrelated or correlated.
SELECT PlayerName , DatOfBirth, FIDERating ,FIDETitle,player.ClubName
FROM player
WHERE player.ClubName =(
SELECT club.ClubName
FROM club WHERE clubname.ClubName='Link')
If uncorrelated any help in understanding how to get a correlated query from this would be very much appreciated
Here is a list of the tables I'm trying to do the query on:
CREATE TABLE chessleague.table2 ( PlayerName VARCHAR(50) NOT NULL , DateOfBirth VARCHAR(10) NOT NULL , FIDERating INT NOT NULL , FIDETitle VARCHAR(22), ClubName VARCHAR(50) NOT NULL, PRIMARY KEY (PlayerName),FOREIGN KEY (ClubName) REFERENCES table1(ClubName);
CREATE TABLE chessleague.table1 ( ClubName VARCHAR(50) NOT NULL , Address VARCHAR(100) NOT NULL , DateFormed VARCHAR(10) NOT NULL , PRIMARY KEY (ClubName);
The requirement is very vague and only requires me to have one correlated and one uncorrelated.