TOPIC: SQL To Suneido Cheat sheet
#1170
SQL To Suneido Cheat sheet 2 Years, 4 Months ago
I have uploaded a cheat sheet with the SQL commands and equivalent Suneido commands

May be of use to SQL programmers trying to learn Suneido

Jason
 
 
#1171
Re:SQL To Suneido Cheat sheet 2 Years, 4 Months ago
Could not attach PDF file so I zipped it up.

J
File Attachment:
File Name: SQL_Cheat_sheet.zip
File Size: 69827
 
 
#1173
Re:SQL To Suneido Cheat sheet 2 Years, 4 Months ago
That's great - thanks! Is it ok if I add a version of this to the documentation?

A few comments:

- the commands you're showing as running with Database() can all be run with QueryView as well - I'd suggest just giving the Suneido query in the table (similar to how you're giving just the SQL query)

- the update example can be done in a single query: update products where name = "apples" set name = "pears"

- "select name from products" would be equivalent to "products project name", "select * from products" would be equivalent to just "products"

- join is by all common columns - if you don't want to join on a particular column you need to rename it in one of the sources

- Suneido always removes duplicats (e.g. from project or union) so you don't require DISTINCT, if you want duplicates you have to do something to make them different

Another difference (advantage) with Suneido is that you can easily compose complex queries e.g. a project x join b union d summarize ... (similar to algrebra)
 
 
andrew