समस्या के प्रकार को Relational Division
. कहा जाता है
SELECT a.md5,
a.url,
a.title
FROM Links a
INNER JOIN Tags b
ON a.md5 = b.md5
WHERE b.Tag IN ('awesome', 'useful') -- <<== list of desired tags
GROUP BY a.md5, a.url, a.title
HAVING COUNT(*) = 2 -- <<== number of tags defined
आउटपुट
╔══════╦════════════╦═══════╗
║ MD5 ║ URL ║ TITLE ║
╠══════╬════════════╬═══════╣
║ a0a0 ║ google.com ║ foo ║
╚══════╩════════════╩═══════╝