# Cannot return the result

**URL:** <https://forum.codewithmosh.com/t/cannot-return-the-result/15706>\
**Category:** SQL\
**Created:** [October 7, 2022, 3:11am UTC](https://forum.codewithmosh.com/t/cannot-return-the-result/15706 "2022-10-07T03:11:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShahidDz](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@ShahidDz](https://forum.codewithmosh.com/u/ShahidDz)\
**Post date:** [October 7, 2022, 3:11am UTC](https://forum.codewithmosh.com/t/cannot-return-the-result/15706/1 "2022-10-07T03:11:35Z")

</div>

Hi. Can someone enlighten me on which part that my query is wrong?  
Thanks in advance.

USE sql\_store;  
SELECT order\_id = 6,  
quantity,  
unit\_price,  
(quantity \* unit\_price) AS total\_price,  
FROM order\_items,  
WHERE total\_price \> 30

---

<div class="post-metadata">

**Author:** ![jmrunkle](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/jmrunkle/32/3765_2.png) [@jmrunkle](https://forum.codewithmosh.com/u/jmrunkle)\
**Post date:** [October 7, 2022, 3:34am UTC](https://forum.codewithmosh.com/t/cannot-return-the-result/15706/2 "2022-10-07T03:34:38Z")

</div>

> [@ShahidDz](#):
>
> SELECT order\_id = 6,  
> quantity,  
> unit\_price,  
> (quantity \* unit\_price) AS total\_price,  
> FROM order\_items,  
> WHERE total\_price \> 30

Should look more like this if this is standard SQL:

```sql
SELECT
  quantity,
  unit_price,
  (quantity * unit_price) AS total_price,
FROM order_items
WHERE total_price > 3
  AND order_id = 6

```

Although technically that depends on what you were trying to do.
