question stringlengths 28 123 | SQL stringlengths 26 217 | Unnamed: 2 float64 | Unnamed: 3 float64 | Unnamed: 4 float64 | Unnamed: 5 float64 | Unnamed: 6 float64 |
|---|---|---|---|---|---|---|
List all clans whose names start with 'Clan' or have a leader_id greater than 500. | SELECT * FROM clans WHERE name LIKE 'Clan%' OR leader_id > 500; | null | null | null | null | null |
List IDs, names, equipped item names, and levels of all characters with equipped items. | SELECT T2.character_id, T2.name, T1.item_name, T2.level FROM equipments AS T1 JOIN characters AS T2 ON T1.character_id = T2.character_id; | null | null | null | null | null |
Display combined names and descriptions of clans containing 'hero' in their names. | SELECT CONCAT(name, ' - ', description) FROM clans WHERE name LIKE '%Clan%'; | null | null | null | null | null |
Retrieve all character information for the player with player_id equal to 5. | SELECT * FROM characters WHERE player_id = 5; | null | null | null | null | null |
Retrieve all NPCs located in 'Cave_of_Dragons'. | SELECT * FROM npcs WHERE location = 'Cave_of_Dragons'; | null | null | null | null | null |
Count the number of accounts with usernames containing 'admin'. | SELECT COUNT(*) FROM players WHERE username LIKE '%admin%'; | null | null | null | null | null |
Retrieve quest progresses with progress either greater than or equal to 70 or less than or equal to 30. | SELECT * FROM quest_progresses WHERE progress >= 70 OR progress <= 30; | null | null | null | null | null |
Count the number of characters with experience of at least 100,000. | SELECT COUNT(*) FROM characters WHERE experience >= 100000; | null | null | null | null | null |
List names of NPCs that share the same location. | SELECT A.name, B.name FROM npcs A INNER JOIN npcs B ON A.location = B.location WHERE A.npc_id != B.npc_id; | null | null | null | null | null |
Find quests with rewards of 500 or more experience and items either 'armor' or 'sword'. | SELECT * FROM quests WHERE reward_experience >= 500 AND (reward_items = 'armor' OR reward_items = 'sword'); | null | null | null | null | null |
Find quests currently in progress with reward experience between 100 and 200. | SELECT * FROM quests AS q JOIN quest_progresses AS qp ON q.quest_id = qp.quest_id WHERE qp.status = 'ing' AND q.reward_experience BETWEEN 100 AND 200; | null | null | null | null | null |
Retrieve names, levels, experience, item names, and quantities for characters with experience between 1000 and 2000. | SELECT c.name, c.level, c.experience, i.item_name, i.quantity FROM characters AS c JOIN inventory_items AS i ON c.character_id = i.character_id WHERE c.experience BETWEEN 1000 AND 2000; | null | null | null | null | null |
Select quests with status 'Doesn't start', displaying 10 records starting from the 20th record. | SELECT * FROM quest_progresses WHERE status = 'Doesn't start
' LIMIT 10 OFFSET 20; | null | null | null | null | null |
Show 7 clans whose names include 'wind', ordered by description, skipping the first 3. | SELECT * FROM clans WHERE name LIKE '%wind%' ORDER BY description LIMIT 7 OFFSET 3; | null | null | null | null | null |
List character IDs and names currently in progress on quests and having more than 500 experience. | SELECT c.character_id, c.name FROM characters AS c JOIN quest_progresses AS q ON c.character_id = q.character_id WHERE q.status = 'ing' AND c.experience > 500; | null | null | null | null | null |
List all wizard class characters with experience greater than or equal to 10000. | SELECT * FROM characters WHERE experience >= 10000 AND character_class = 'wizard'; | null | null | null | null | null |
Identify all clans with a leader_id between 200 and 300 whose descriptions do not include the word 'equipment'. | SELECT * FROM clans WHERE leader_id BETWEEN 200 AND 300 AND description NOT LIKE '%equipment%'; | null | null | null | null | null |
Count the total number of records stored in the NPCs table. | SELECT COUNT(*) FROM npcs; | null | null | null | null | null |
Show the three quests with the lowest progress for character_id 100. | SELECT * FROM quest_progresses WHERE character_id = 100 ORDER BY progress ASC LIMIT 3; | null | null | null | null | null |
Find all players who joined between January 1, 2021 and December 31, 2021. | SELECT * FROM players WHERE date_joined >= '2021-01-01' AND date_joined <= '2021-12-31'; | null | null | null | null | null |
List all skill trees sorted alphabetically by skill name. | SELECT * FROM skill_trees ORDER BY skill_name ASC; | null | null | null | null | null |
How many users joined today? | SELECT COUNT(*) FROM players WHERE DATE(date_joined) = CURDATE(); | null | null | null | null | null |
List 5 skills for character ID 200 with level 2 or higher, sorted by lowest level first. | SELECT * FROM skill_trees WHERE character_id = 200 AND level >= 2 ORDER BY level ASC LIMIT 5; | null | null | null | null | null |
Provide descriptions of clans whose names end with 'The Hunter' and have leader IDs 200 or higher. | SELECT description FROM clans WHERE name LIKE '%The Hunter' AND leader_id >= 200; | null | null | null | null | null |
Retrieve a list of all players who have an email address. | SELECT * FROM players WHERE email IS NOT NULL; | null | null | null | null | null |
List names of the first 10 equipped items, ordered by the lowest character IDs. | SELECT item_name FROM equipments WHERE equipped = TRUE ORDER BY character_id ASC LIMIT 10; | null | null | null | null | null |
Retrieve character names and their skill names for characters level 20 or higher. | SELECT C.name, ST.skill_name FROM characters AS C JOIN skill_trees AS ST ON C.character_id = ST.character_id WHERE C.level >= 20; | null | null | null | null | null |
Find quests that offer exactly 200 experience points as a reward. | SELECT * FROM quests WHERE reward_experience = 200; | null | null | null | null | null |
List all quests ordered by reward experience from highest to lowest. | SELECT * FROM quests ORDER BY reward_experience DESC; | null | null | null | null | null |
Provide the first 5 equipped items sorted by item_name ascending. | SELECT * FROM equipments WHERE equipped = TRUE ORDER BY item_name LIMIT 5; | null | null | null | null | null |
List quest names containing 'Venus' with reward experience of 500 or higher. | SELECT name FROM quests WHERE reward_experience >= 500 AND name LIKE '%Venus%'; | null | null | null | null | null |
Select all currently equipped items. | SELECT * FROM equipments WHERE equipped = TRUE; | null | null | null | null | null |
Find quests with reward experience of 150 or less containing the word 'Dragon'. | SELECT * FROM quests WHERE reward_experience <= 150 AND name LIKE '%Dragon%'; | null | null | null | null | null |
List names and classes of all characters with levels of 50 or below. | SELECT name, character_class FROM characters WHERE level <= 50; | null | null | null | null | null |
List the number of characters each player has, grouped by character class. | SELECT P.player_id, C.character_class, COUNT(*) FROM players AS P JOIN characters AS C ON P.player_id = C.player_id GROUP BY P.player_id, C.character_class; | null | null | null | null | null |
Identify clan IDs and names for clans whose description includes the word 'legend'. | SELECT clan_id, name FROM clans WHERE description LIKE '%Clan%'; | null | null | null | null | null |
Show combined skill names and levels for skills with skill_tree_id greater than 150 and level less than 3. | SELECT CONCAT(skill_name, ' - Level ', level) AS skill_and_level FROM skill_trees WHERE skill_tree_id > 150 AND level < 3; | null | null | null | null | null |
Retrieve quests named either 'Hunt-Goblin' or 'collect-flower'. | SELECT * FROM quests WHERE name = 'Hunt-Goblin' OR name = 'collect-flower'; | null | null | null | null | null |
List distinct player IDs of characters with experience at least 100,000 and level at least 50. | SELECT DISTINCT player_id FROM characters WHERE experience >= 100000 AND level >= 50; | null | null | null | null | null |
List quest names and reward experience containing 'dragon' in description, ordered by name descending and reward ascending. | SELECT name, reward_experience FROM quests WHERE description LIKE '%dragon%' ORDER BY name DESC, reward_experience ASC; | null | null | null | null | null |
List all equipped items for character_id 7, ordered by item_name descending. | SELECT * FROM equipments WHERE character_id = 7 AND equipped = TRUE ORDER BY item_name DESC; | null | null | null | null | null |
Count equipment items for characters whose character_id is greater than 50. | SELECT COUNT(*) FROM equipments WHERE character_id > 50; | null | null | null | null | null |
List names of characters with experience of 5000 or more. | SELECT name FROM characters WHERE experience >= 5000; | null | null | null | null | null |
Retrieve item names with inventory IDs 100, 200, and 300. | SELECT item_name FROM inventory_items WHERE inventory_id IN (100, 200, 300); | null | null | null | null | null |
List clan names along with their creators' names, excluding clans without creators. | SELECT c.name, p.username FROM clans c JOIN players p ON c.leader_id = p.player_id WHERE c.leader_id IS NOT NULL; | null | null | null | null | null |
List player IDs and names for characters with at least 1,000,000 experience or class 'Assassin'. | SELECT player_id, name FROM characters WHERE experience >= 1000000 OR character_class = 'Assassin'; | null | null | null | null | null |
Show the bottom 5 skills from the skill tree for character ID 2, sorted by skill name. | SELECT * FROM skill_trees WHERE character_id = 2 ORDER BY skill_name DESC LIMIT 5; | null | null | null | null | null |
List names and experience of warrior class characters with levels between 50 and 100. | SELECT name, experience FROM characters WHERE level >= 50 AND level <= 100 AND character_class = 'warrior'; | null | null | null | null | null |
Count clans grouped by the length of their names. | SELECT LENGTH(name) as name_length, COUNT(*) FROM clans GROUP BY name_length; | null | null | null | null | null |
List item names starting with 'sword', ordered alphabetically. | SELECT item_name FROM inventory_items WHERE item_name LIKE 'sword%' ORDER BY item_name; | null | null | null | null | null |
List clan names and descriptions ordered alphabetically by name. | SELECT name, description FROM clans ORDER BY name; | null | null | null | null | null |
Count the total number of quests with reward experience less than 500. | SELECT COUNT(*) FROM quests WHERE reward_experience < 500; | null | null | null | null | null |
Show character names labeled 'master' if their level is above 50 or 'rudiments' if below. | SELECT name, CASE WHEN level > 50 THEN 'master' ELSE 'rudiments
' END AS player_status FROM characters; | null | null | null | null | null |
Retrieve player IDs, names, and levels of characters with levels between 10 and 20. | SELECT player_id, name, level FROM characters WHERE level >= 10 AND level <= 20; | null | null | null | null | null |
Identify the item that is most frequently equipped. | SELECT item_name FROM equipments WHERE equipped = TRUE GROUP BY item_name ORDER BY COUNT(*) DESC LIMIT 1; | null | null | null | null | null |
List names of characters whose experience is at least 5,000,000 or whose class is 'warrior'. | SELECT name FROM characters WHERE experience >= 5000000 OR character_class = 'warrior'; | null | null | null | null | null |
List usernames and character names of players who have not logged in for 7 or more days. | SELECT P.username, C.name FROM players AS P JOIN characters AS C ON P.player_id = C.player_id WHERE P.last_login <= DATE_SUB(NOW(), INTERVAL 7 DAY); | null | null | null | null | null |
Find players who joined within the period from January 1, 2021 to December 31, 2021. | SELECT * FROM players WHERE date_joined BETWEEN '2021-01-01' AND '2021-12-31'; | null | null | null | null | null |
Count the number of NPCs grouped by their locations. | SELECT location, COUNT(*) FROM npcs GROUP BY location; | null | null | null | null | null |
Retrieve player IDs of users named 'Thor', 'Hulk', or 'Hawkeye' who last logged in after March 1, 2023. | SELECT player_id FROM players WHERE last_login > '2023-03-01' AND username IN ('Thor', 'Hulk', 'Hawkeye'); | null | null | null | null | null |
Retrieve player IDs, usernames, levels, classes, and join dates for all players. | SELECT P.player_id, P.username, C.level, C.character_class, P.date_joined FROM players AS P JOIN characters AS C ON P.player_id = C.player_id; | null | null | null | null | null |
List names of the five quests with the lowest quest IDs that have reward items. | SELECT name FROM quests WHERE reward_items IS NOT NULL ORDER BY quest_id ASC LIMIT 5; | null | null | null | null | null |
Calculate average character experience grouped by each player's last login date. | SELECT players.last_login, AVG(characters.experience) AS avg_experience FROM players JOIN characters ON players.player_id = characters.player_id GROUP BY players.last_login; | null | null | null | null | null |
Sum the quantities of items owned by character ID 101. | SELECT SUM(quantity) FROM inventory_items WHERE character_id = 101; | null | null | null | null | null |
Retrieve names and descriptions of clans whose leader ID is 10. | SELECT name, description FROM clans WHERE leader_id = 10; | null | null | null | null | null |
List player IDs for players who joined after January 1, 2023. | SELECT player_id FROM players WHERE date_joined > '2023-01-01 00:00:00'; | null | null | null | null | null |
List each reward item and the number of quests offering it, grouped by reward items. | SELECT reward_items, COUNT(*) AS quest_count FROM quests WHERE reward_items IS NOT NULL GROUP BY reward_items; | null | null | null | null | null |
List quest and character names for quests not completed with progress 50% or higher. | SELECT q.name, c.name FROM quest_progresses AS qp JOIN quests AS q ON qp.quest_id = q.quest_id JOIN characters AS c ON qp.character_id = c.character_id WHERE qp.status != 'completed' AND qp.progress >= 50; | null | null | null | null | null |
List equipped items and item names for characters with experience of 5000 or more. | SELECT e.*, e.item_name FROM characters AS c JOIN equipments AS e ON c.character_id = e.character_id WHERE c.experience >= 5000; | null | null | null | null | null |
List completed quests' names and reward items with reward experience between 100 and 200. | SELECT q.name, q.reward_items FROM quests AS q JOIN quest_progresses AS qp ON q.quest_id = qp.quest_id WHERE qp.status = 'completed' AND q.reward_experience BETWEEN 100 AND 200; | null | null | null | null | null |
Show quest names and reward experience for quests in progress or completed. | SELECT q.name, q.reward_experience FROM quests AS q JOIN quest_progresses AS qp ON q.quest_id = qp.quest_id WHERE qp.status = 'standing by' OR qp.status = 'completed'; | null | null | null | null | null |
Show the name and email of the clan leader who logged in most recently. | SELECT players.username, players.email FROM players JOIN clans ON clans.leader_id = players.player_id WHERE players.last_login = (SELECT MAX(last_login) FROM players); | null | null | null | null | null |
Get character IDs and number of equipped items for characters with at least 5 equipped items. | SELECT character_id, COUNT(*) AS number_of_equipments FROM equipments WHERE equipped = 1 GROUP BY character_id HAVING COUNT(*) >= 5; | null | null | null | null | null |
Calculate the number of characters using skills at each skill level. | SELECT level, COUNT(character_id) FROM skill_trees GROUP BY level; | null | null | null | null | null |
List NPCs located in 'ancient_forest' that have related quests. | SELECT name FROM npcs WHERE location = 'ancient_forest' AND related_quest IS NOT NULL; | null | null | null | null | null |
Calculate total levels of characters owned by each player. | SELECT SUM(T2.level), T1.player_id FROM players AS T1 JOIN characters AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id; | null | null | null | null | null |
Identify the quest currently in progress for the highest number of characters. | SELECT quest_id FROM quest_progresses WHERE status = 'standing by' GROUP BY quest_id ORDER BY COUNT(*) DESC LIMIT 1; | null | null | null | null | null |
Retrieve data for skills containing 'recovery' in the skill name. | SELECT skill_name FROM skill_trees WHERE skill_name LIKE '%recovery%'; | null | null | null | null | null |
Retrieve skill tree IDs and skill names for character ID 10. | SELECT skill_tree_id, skill_name FROM skill_trees WHERE character_id = 10; | null | null | null | null | null |
List email addresses of new users who are clan leaders. | SELECT players.email FROM players JOIN clans ON players.player_id = clans.leader_id ORDER BY players.date_joined DESC LIMIT 1; | null | null | null | null | null |
Calculate total reward experience grouped by each reward item. | SELECT reward_items, SUM(reward_experience) AS reward_experience FROM quests GROUP BY reward_items; | null | null | null | null | null |
List names and levels of the characters most recently accessed by players. | SELECT C.name, C.level FROM players AS P JOIN characters AS C ON P.player_id = C.player_id WHERE P.last_login = (SELECT MAX(last_login) FROM players); | null | null | null | null | null |
List player IDs and item names for characters with equipped items. | SELECT T1.player_id, T2.item_name FROM characters AS T1 JOIN equipments AS T2 ON T1.character_id = T2.character_id WHERE T2.equipped = TRUE; | null | null | null | null | null |
Identify the username of the player with the highest-level character. | SELECT P.username FROM players AS P JOIN characters AS C ON P.player_id = C.player_id ORDER BY C.level DESC LIMIT 1; | null | null | null | null | null |
Identify the name and level of the character with the most equipped items. | SELECT T2.name, T2.level FROM equipments AS T1 JOIN characters AS T2 ON T1.character_id = T2.character_id WHERE T1.equipped = true GROUP BY T2.name, T2.level ORDER BY COUNT(*) DESC LIMIT 1; | null | null | null | null | null |
Identify the name of the completed quest with the highest reward experience. | SELECT T1.name FROM quests AS T1 JOIN quest_progresses AS T2 ON T1.quest_id = T2.quest_id WHERE T2.status = 'completed' ORDER BY T1.reward_experience DESC LIMIT 1; | null | null | null | null | null |
List character IDs, names, levels, and skill names of all characters belonging to player ID 200. | SELECT T1.character_id, T1.name, T1.level, T2.skill_name FROM characters AS T1 JOIN skill_trees AS T2 ON T1.character_id = T2.character_id WHERE T1.player_id = 200; | null | null | null | null | null |
Retrieve the progress of character ID 3 where quest status is 'standing by'. | SELECT progress FROM quest_progresses WHERE character_id = 3 AND status = 'standing by'; | null | null | null | null | null |
List quest names and reward experience for quests with 100% progress. | SELECT q.name, q.reward_experience FROM quests AS q JOIN quest_progresses AS qp ON q.quest_id = qp.quest_id WHERE qp.progress = 100; | null | null | null | null | null |
List all player character classes along with their equipped item names. | SELECT C.character_class, E.item_name FROM characters AS C JOIN equipments AS E ON C.character_id = E.character_id; | null | null | null | null | null |
List the top 5 NPC names and roles with related quest IDs of 100 or below, ordered by related quest ID descending. | SELECT name, role FROM npcs WHERE related_quest <= 100 ORDER BY related_quest DESC LIMIT 5; | null | null | null | null | null |
Calculate average progress per quest across all participating characters. | SELECT q.quest_id, AVG(qp.progress) AS average_progress FROM quests q JOIN (SELECT * FROM quest_progresses) qp ON q.quest_id = qp.quest_id GROUP BY q.quest_id; | null | null | null | null | null |
List skill names along with the number of characters possessing each skill. | SELECT skill_name, COUNT(character_id) FROM skill_trees GROUP BY skill_name; | null | null | null | null | null |
Count the total number of NPCs grouped by their role. | SELECT role, COUNT(npc_id) FROM npcs GROUP BY role; | null | null | null | null | null |
Count total number of quests currently in progress. | SELECT COUNT(*) AS in_progress_count FROM quests q JOIN (SELECT * FROM quest_progresses WHERE status = 'in progress') qp ON q.quest_id = qp.quest_id; | null | null | null | null | null |
List names, levels, experience, class, and skill names for characters level 50-100 with experience of 5000 or more. | SELECT T1.name, T1.level, T1.experience, T1.character_class, T2.skill_name FROM characters AS T1 JOIN skill_trees AS T2 ON T1.character_id = T2.character_id WHERE T1.level BETWEEN 50 AND 100 AND T1.experience >= 5000; | null | null | null | null | null |
Retrieve names and character classes for characters with player IDs 2, 4, and 6. | SELECT name, character_class FROM characters WHERE player_id IN (2, 4, 6); | null | null | null | null | null |
List skill names from skill trees for character ID 4 with levels 3 or 5. | SELECT skill_name FROM skill_trees WHERE character_id = 4 AND (level = 3 OR level = 5); | null | null | null | null | null |
Retrieve quest names, reward experiences, and reward items for quests performed by each character. | SELECT T1.name, T3.name, T3.reward_experience, T3.reward_items FROM characters AS T1 JOIN quest_progresses AS T2 ON T1.character_id = T2.character_id JOIN quests AS T3 ON T2.quest_id = T3.quest_id; | null | null | null | null | null |
List player IDs and emails of the top 5 users sorted by the most recent login date. | SELECT player_id, email FROM players ORDER BY last_login DESC LIMIT 5; | null | null | null | null | null |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 8