PHP基础
PHP教程
php框架
JavaScript
asp.net
AJAX
正则表达式
ASP
输入
banner图
图片脚本
导航/分类
SQL技巧之分类汇总
a
as
(
select
type,
sum
(num)
as
num
from
foods
group
by
type), b
as
(
select
type,(
case
when
type
=
‘
小麦
‘
then
1.2
when
type
=
‘
玉米
‘
then
1.5
end
)
*
num
as
price
from
a)
select
sum
(price)
as
result
from
b
SQL技巧之分类汇总
标签: