sql コマンド group by グループ化
group by は、
テーブル内で選択された列で同じ値の行をグループ化します。
select * from table_1 btoup by NO;
select * sum(mny) from fruit_table group by fruit;
sum()は、グループ全体について
値を計算します。
select b,sum(c) from table group by b having sum(c) > 20;
select b,sum(c) from table group by b having b < 'a';
group by は、
テーブル内で選択された列で同じ値の行をグループ化します。
select * from table_1 btoup by NO;
select * sum(mny) from fruit_table group by fruit;
sum()は、グループ全体について
値を計算します。
select b,sum(c) from table group by b having sum(c) > 20;
select b,sum(c) from table group by b having b < 'a';