请教SQL的查询问题
我的表orderInfo中有这样几个字段:sNum1 smallint,sDate1 char(6),sNum2 smallint,sDate2 char(6),sNum3 smallint,sDate3 char(6),
也就是销售日期和销售数量,也就是说:某类产品有可能在不同的日期进行销售(也可能跨月),现在我想查询当输入销售年月时,
把该年月销售的数量进行相加,该表还有字段id,name等(id是关键字),
感觉好像select id,name,sNum1 from orderInfo where sDate1="202004",select id,name,sNum2 from orderInfo where sDate2="202004",select id,name,sNum3 from orderInfo where sDate3="202004"
分别运行,然后根据相同ID把sNum1+sNum2+sNum3进行相加,可是不知道怎么写?请问能不能帮我写这样的SQL语句?
只写一条SQL语句还是要写多条语句?