SQL and Python in System Console

Hello Community,

I wrote below query and got Output as desired.

SQL:

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.
Python:

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.

Thanks.