私は現在、クエリで遊んでいます
SELECT sex, count(sex) as [count], problem1, problem2, problem3
from myTable
group by sex, problem1, problem2, problem3
order by sex, problem1, problem2, problem3
これにより、性別ごとに可能なすべてのビットの組み合わせ(1、1、1、または1、01)などのカウントが得られます
ユニオンクエリを使用して、追加の列で男性と女性の合計数を取得する方法はありますか?
それで
sex count problem1 problem2 problem3 (ここに性別の数が入ります)
両方の性別でそれができない場合、片方だけでできる方法はありますか?
編集済み: 最後の列、女性の合計数は私が追加したいものです。