Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Sql error

0 Kudos
197
  • SAP Managed Tags:

How can I convert this query to sql sap Hana?

select txn_year,txn_month, sum(transaction_volume) as transaction_volume from (select year(from_unixtime(t.timestamp/1000)) as txn_year,MONTHNAME(from_unixtime(t.timestamp/1000)) as txn_month, count(t.id) transaction_volume from type_4 t

where t.assetId="EvN8cvuGKC2t1PA8ZEsgJth3paenSP4UAd8Z6K14z2P4" GROUP BY txn_month,txn_year union select year(from_unixtime(t.timestamp/1000)) as txn_year,MONTHNAME(from_unixtime(t.timestamp/1000)) as txn_month, count(t.id) transaction_volume from type_11 t
where t.assetId="EvN8cvuGKC2t1PA8ZEsgJth3paenSP4UAd8Z6K14z2P4" GROUP BY txn_month,txn_year ) sd GROUP BY txn_month,txn_year ORDER BY FIELD(txn_month,'January','February','March','April','May','June','July','August','September','October','November','December');

1 REPLY 1

former_member610331
Contributor
0 Kudos
83
  • SAP Managed Tags:

Hi jass kopov

Have you tried this tool - https://github.com/B1SA/HanaTranslator-Src to convert your query to SQL SAP Hana format?

Regards,

Sam