Comments (2)
Well, I'd argue this is not an issue. If you are able to solve the mystery this way, solving it the intended way should be trivial.
It's rather a good third challenge, finding both culprits, using a single query, mastering some more advanced SQL concepts:
Spoiler warning
The following query would accomplish this:
WITH RECURSIVE split(content, last, rest) AS (
VALUES('', '', (select sql from sqlite_master where type = 'trigger' and name = 'check_solution'))
UNION ALL
SELECT
CASE WHEN last = "'"
THEN
substr(rest, 1, 1)
ELSE
content || substr(rest, 1, 1)
END,
substr(rest, 1, 1),
substr(rest, 2)
FROM split
WHERE rest <> ''
)
SELECT
name
FROM
split, person
WHERE
(last = "'" OR rest ='') AND hex(name) = REPLACE(content, "'",'');```
</details>
from sql-mysteries.
If this was like CTF game, seeing the trigger's source code to check the answer would be a great solution (I did try this as my first attempt hehe), but this is more of a fun detective game to train/learn sql, so being able to see the answer right away with little modification kinda defeat the purpose.
Maybe keep it as possibility like we can do this after solving the intended way. So when we try to query the trigger, it give the result like " Haha, nice one detective, it is indeed a fast way to solve this mystery, but hey you are the greatest detective!, no need to cheat, use your SQL and BrainPower!. You can do this after solving the mystery"
from sql-mysteries.
Related Issues (20)
- encourage use of get_fit tables HOT 4
- Main Thread Lock HOT 1
- Solution is too easy to infer HOT 3
- Walkthrough has an example that may be inadvisable HOT 3
- Solution is discoverable in a hacky way HOT 1
- Mysql database file HOT 1
- I love this game ❤️ HOT 1
- Missed Easter Egg Opportunity?
- I have translated it to Chinese version.刚做了个中文版SQL-mysteries HOT 1
- Proposal for internationalisation solution HOT 3
- Having trouble locating and connecting to the database. HOT 2
- Database takes a long time to initialize on Chrome HOT 5
- Thank you for making this game.
- Alice in Wonderland Easter Egg? HOT 3
- The page is not loading correctly. HOT 1
- input query is not displayed correctly HOT 2
- My SQL
- Block write operations HOT 2
- Updating requirements.txt
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sql-mysteries.