Skip to content

Commit

Permalink
Show Unpicked Belids in Number Times of Belief Adoption
Browse files Browse the repository at this point in the history
  • Loading branch information
ImmoSS committed Jan 7, 2025
1 parent 8958213 commit e2fd94c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions data.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,11 +601,15 @@ const sqlQueries = {
GROUP BY BeliefID
ORDER BY MIN(Turn);
SELECT BeliefType AS "Belief Type", BeliefKey AS "Belief",
COUNT(*) AS "Total Times Adopted"
FROM T2
GROUP BY BeliefID
ORDER BY COUNT(*) DESC;
SELECT BeliefTypes.BeliefType AS "Belief Type", ifnull("Belief", BeliefKeys.BeliefKey) AS "Belief", ifnull("Total Times Adopted", 0) AS "Total Times Adopted" FROM (
SELECT BeliefKey AS "Belief",
COUNT(*) AS "Total Times Adopted"
FROM T2
GROUP BY BeliefID
ORDER BY COUNT(*) DESC
)
RIGHT OUTER JOIN BeliefKeys ON BeliefKeys.BeliefKey = "Belief"
JOIN BeliefTypes ON BeliefTypes.TypeID = BeliefKeys.TypeID;
DROP TABLE T2;
`,
Expand Down

0 comments on commit e2fd94c

Please sign in to comment.