ike560 commented on issue #2738:
URL:
https://github.com/apache/arrow-datafusion/issues/2738#issuecomment-1173358396
Solved!
After modifying the SQL as below, it was OK. **Help. Do you know why this
modified SQL is OK?**
Before GROUP BY company
After GROUP BY company, stock_code
```py
sql = '''
SELECT mas.company, SUM(CAST(trading_volume AS INTEGER)/10000000) AS
sum_trading_volume FROM (
SELECT stock_code, company FROM stock_master) AS mas
INNER JOIN stock_trading_info
USING (stock_code)
GROUP BY company, stock_code
ORDER BY sum_trading_volume DESC
LIMIT 10
'''
df = ctx.sql(sql)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]