问题遇到的现象和发生背景
测试where语句,第二种语句返回0行数据
问题相关代码,请勿粘贴截图
```sql
select e.* from
(select name, salary, deductions["Federal Taxes"] as ded,
salary * (1 - deductions["Federal Taxes"]) as salary_minus_fed_taxes from employees) e
where round(e.salary_minus_fed_taxes) > 70000;
------------------------结果-------------------------------
+------------+-----------+--------+---------------------------+
| e.name | e.salary | e.ded | e.salary_minus_fed_taxes |
+------------+-----------+--------+---------------------------+
| John Doe | 100000.0 | 0.2 | 80000.0 |
| John Bob | 300000.0 | 0.4 | 180000.0 |
| John Bill | 200000.0 | 0.3 | 140000.0 |
+------------+-----------+--------+---------------------------+
----------------------------第二种方式:
select name, salary, deductions["Federal Taxes"] as ded,
salary * (1 - deductions["Federal Taxes"]) as salary_minus_fed_taxes from employees
where (select salary * (1 - deductions["Federal Taxes"]) from employees) = 80000.0;
----------------结果--------------------------------------
+-------+---------+------+-------------------------+
| name | salary | ded | salary_minus_fed_taxes |
+-------+---------+------+-------------------------+
+-------+---------+------+-------------------------+