'SQL, I want just see who have in the same time
I have this table:
TABLE tb_players (
"idPlayer" BIGINT,
"flFacebook" BIGINT,
"flTwitter" BIGINT,
"flTwitch" BIGINT,
"descCountry" TEXT,
"dtBirth" TEXT,
"dtRegistration" TEXT
I did this:
SELECT SUM(flFacebook) AS totalFB,
SUM(flTwitter) AS totalTwitter,
SUM(flTwitch) AS totalTwitch
FROM tb_players
| totalFB | totalTwitter | totalTwitch |
|---|---|---|
| 63 | 44 | 53 |
And I want just see who have in the same time:
flFacebook, flTwitter, flTwitch
How do it? I try this:
SELECT
SUM(flFacebook), SUM(flTwitter), SUM(flTwitch)
FROM
tb_players
INNER JOIN
flFacebook
ON(
(tb_players.flTwitter)
AND
(tb_players.flTwitch))
But not work
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
