Name: ~sq_cChartSubmission~sq_cChartsRhythmGames Subform1
PARAMETERS __ChartID Value;
SELECT DISTINCTROW *
FROM (SELECT [ChartsRhythmGames].[GameID], [RhythmGames].[GameName], [ChartsRhythmGames].[ChartID] FROM RhythmGames INNER JOIN ChartsRhythmGames ON [RhythmGames].[GameID] =[ChartsRhythmGames].[GameID])  AS ChartSubmission
WHERE ([__ChartID] = ChartID);

--------------------------
Name: ~sq_cCustomRemixGamesMangement~sq_cChartID
SELECT [Charts].[ChartID], Charts.SongName
FROM Charts;

--------------------------
Name: ~sq_cCustomRemixGamesMangement~sq_cGameID
SELECT [RhythmGames].[GameID], [RhythmGames].[GameName], RhythmGames.Console
FROM RhythmGames;

--------------------------
Name: ~sq_cNavigation Form~sq_cNavigationSubform
SELECT DISTINCTROW *
FROM Creators;

--------------------------
Name: ~sq_fCustomRemixGamesMangement
SELECT [ChartsRhythmGames].[ChartID], [Charts].[SongName], [ChartsRhythmGames].[GameID], [RhythmGames].[GameName]
FROM Charts INNER JOIN (RhythmGames INNER JOIN ChartsRhythmGames ON [RhythmGames].[GameID] =[ChartsRhythmGames].[GameID]) ON [Charts].[ChartID] =[ChartsRhythmGames].[ChartID];

--------------------------
Name: ChartsByNumberOfRhythmGamesHighestToLowest
SELECT Charts.ChartID, SongName & " (" & SongArtist & ")" AS Chart, COUNT(GameID) AS [Number of Rhythm Games], CreatorName, Length, Genre, Medium, DateUploaded, DateUpdated
FROM (Charts INNER JOIN ChartsRhythmGames ON Charts.ChartID = ChartsRhythmGames.ChartID) INNER JOIN Creators ON Creators.CreatorID = Charts.CreatorID
GROUP BY Charts.ChartID, SongName & " (" & SongArtist & ")", CreatorName, Length, Genre, Medium, DateUploaded, DateUpdated
ORDER BY COUNT(GameID) DESC;

--------------------------
Name: ChartsByRhythmGameDensity
SELECT SongName, [Number of Rhythm Games], Round((((( Charts.Length - Charts.Length Mod 100 ) / 100)*60)+(Charts.Length Mod 100)) / [Number of Rhythm Games]) AS [Seconds per Rhythm Game]
FROM Charts INNER JOIN ChartsByNumberOfRhythmGamesHighestToLowest ON Charts.ChartID = ChartsByNumberOfRhythmGamesHighestToLowest.ChartID
ORDER BY (((( Charts.Length - Charts.Length Mod 100 ) / 100)*60)+(Charts.Length Mod 100)) / [Number of Rhythm Games];

--------------------------
Name: ChartsOfSongsMadeByTheBeatles
SELECT SongName & " (" & SongArtist & ")" AS Chart, CreatorName, Length, Difficulty, Genre, Medium, DateUploaded, DateUpdated
FROM Charts INNER JOIN Creators ON Creators.CreatorID = Charts.CreatorID
WHERE SongArtist IN ("John Lennon","Paul McCartney","Ringo Starr","George Harrison","The Beatles");

--------------------------
Name: ChartsRhythmGamesWithCueNum
SELECT ChartsRhythmGames.ChartID, SongName, ChartsRhythmGames.GameID, GameName, CueNum
FROM (ChartsRhythmGames INNER JOIN RhythmGames ON ChartsRhythmGames.GameID = RhythmGames.GameID) INNER JOIN Charts ON ChartsRhythmGames.ChartID = Charts.ChartID;

--------------------------
Name: ChartsWithNoRhythmGamesThatContain5Cues
SELECT ChartID, SongName
FROM Charts
WHERE NOT EXISTS (SELECT ChartsRhythmGames.GameID FROM ChartsRhythmGames, RhythmGames WHERE ChartsRhythmGames.GameID = RhythmGames.GameID AND Charts.ChartID = ChartsRhythmGames.ChartID AND CueNum=5);

--------------------------
Name: ChartsWithNoRhythmGamesThatContainMoreThan3Cues
SELECT ChartID, SongName
FROM Charts
WHERE NOT EXISTS (SELECT ChartsRhythmGames.GameID FROM ChartsRhythmGames, RhythmGames WHERE ChartsRhythmGames.GameID = RhythmGames.GameID AND Charts.ChartID = ChartsRhythmGames.ChartID AND CueNum>3);

--------------------------
Name: ChartsWithoutFrogHop
SELECT SongName & " (" & SongArtist & ")" AS Chart, CreatorName, Length, Difficulty, Genre, Medium, DateUploaded, DateUpdated
FROM Charts INNER JOIN Creators ON Charts.CreatorID = Creators.CreatorID
WHERE NOT EXISTS (SELECT GameName FROM RhythmGames, ChartsRhythmGames WHERE ChartsRhythmGames.ChartID = Charts.ChartID AND ChartsRhythmGames.GameID = RhythmGames.GameID AND RhythmGames.GameID = 45);

--------------------------
Name: ChartsWithoutKarateMan
SELECT Charts.ChartID, SongName
FROM Charts
WHERE NOT EXISTS (SELECT GameName FROM RhythmGames, ChartsRhythmGames WHERE ChartsRhythmGames.ChartID = Charts.ChartID AND ChartsRhythmGames.GameID = RhythmGames.GameID AND RhythmGames.GameID = 1);

--------------------------
Name: ChartsWithoutMetronomeRhythmGames
SELECT Charts.ChartID, SongName
FROM Charts
WHERE NOT EXISTS (SELECT GameName FROM RhythmGames, ChartsRhythmGames WHERE ChartsRhythmGames.ChartID = Charts.ChartID AND ChartsRhythmGames.GameID = RhythmGames.GameID AND Category = "Metronome");

--------------------------
Name: ChartsWithoutRatRace
SELECT Charts.ChartID, SongName
FROM Charts
WHERE NOT EXISTS (SELECT GameName FROM RhythmGames, ChartsRhythmGames WHERE ChartsRhythmGames.ChartID = Charts.ChartID AND ChartsRhythmGames.GameID = RhythmGames.GameID AND RhythmGames.GameID = 8);

--------------------------
Name: LengthInSeconds
SELECT SongName, Length, ((( Length - Length Mod 100 ) / 100)*60)+(Length Mod 100) AS [Length in Seconds]
FROM Charts;

--------------------------
Name: NumberOf5CueRhythmGamesInEachChart
SELECT ChartsRhythmGames.ChartID, SongName, COUNT(ChartsRhythmGames.GameID) AS [Number of 5 Cue Rhythm Games]
FROM (ChartsRhythmGames INNER JOIN RhythmGames ON ChartsRhythmGames.GameID = RhythmGames.GameID) INNER JOIN Charts ON ChartsRhythmGames.ChartID = Charts.ChartID
WHERE CueNum=5
GROUP BY ChartsRhythmGames.ChartID, SongName
ORDER BY COUNT(ChartsRhythmGames.GameID) DESC;

--------------------------
Name: NumberOf5or4CueRhythmGamesInEachChart
SELECT SongName & " (" & SongArtist & ")" AS Chart, COUNT(ChartsRhythmGames.GameID) AS [Number of 5 or 4 Cue Rhythm Games], CreatorName, Length, Difficulty, Genre
FROM ((ChartsRhythmGames INNER JOIN RhythmGames ON ChartsRhythmGames.GameID = RhythmGames.GameID) INNER JOIN Charts ON ChartsRhythmGames.ChartID = Charts.ChartID) INNER JOIN Creators ON Creators.CreatorID = Charts.CreatorID
WHERE CueNum=4 OR CueNum=5
GROUP BY ChartsRhythmGames.ChartID, SongName & " (" & SongArtist & ")", CreatorName, Length, Difficulty, Genre
ORDER BY COUNT(ChartsRhythmGames.GameID) DESC;

--------------------------
Name: NumberOfMetronomeGamesInEachChart
SELECT ChartsRhythmGames.ChartID, SongName, COUNT(ChartsRhythmGames.GameID) AS [Number of Metronome Rhythm Games]
FROM (ChartsRhythmGames INNER JOIN RhythmGames ON ChartsRhythmGames.GameID = RhythmGames.GameID) INNER JOIN Charts ON ChartsRhythmGames.ChartID = Charts.ChartID
WHERE Category="Metronome"
GROUP BY ChartsRhythmGames.ChartID, SongName
ORDER BY COUNT(ChartsRhythmGames.GameID) DESC;

--------------------------
Name: RhythmGamesWithSliceInTheName
SELECT GameID, GameName, Console
FROM RhythmGames
WHERE GameName LIKE "*Slice";

--------------------------
Name: SearchforChartsByCreator
SELECT ChartID, SongName
FROM Charts INNER JOIN Creators ON Charts.CreatorID = Creators.CreatorID
WHERE CreatorName LIKE [Search for Creator] &"*";

--------------------------
Name: SearchforChartsByDifficulty
SELECT SongName & " (" & SongArtist & ")" AS Chart, CreatorName, Length, Difficulty, Genre, Medium, DateUploaded, DateUpdated
FROM Charts INNER JOIN Creators ON Charts.CreatorID = Creators.CreatorID
WHERE Difficulty LIKE [Enter desired difficulty (easy, normal, or hard)] &"*";

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