求sql查询语句

select *from (表名)where 商品id=1 and (出库仓库id=1 or 入库仓库id=1)order by 单据日期 asc(提示:默认就是asc正序排,倒叙asc改成desc就行)
select *
from table
where 商品id=1 and (出库仓库id=1 or 入库仓库id=1)
order by 单据日期 asc
上面两位仁兄回答的都是对的