SQL and Python in System Console

Hello Community,

I wrote below query and got Output as desired.


Now when I am trying to get these values in Python as mentioned here, I am not getting output as in SQL.

Please suggest how to do it correctly.

item_qty is not in output

Any hint or suggestions please?

@umarless you can just use frappe.db.sql which is much better for these requests.

1 Like

Thanks @bahaou for quick response.

I just got reference from the @buildwithhussain article.

and frappe.get_all solved the problem.