我有以下
CASE WHEN S.name = 'Stack' THEN E.Price
WHEN M.Type = 'Pricing' THEN V.value * V.Rate
END AS "Price"
尽管我使用select distinct
看来我的sql语句的区别是不是上面给出了区别?我也不想从价格列中排除<null>
。
样本数据:
+----------+------------------------+---------
| Currency | Type | Price |
+----------+------------------------+---------
| USD | stack | <null> |
| USD | stack | 236.34 |
+----------+------------------------+---------