Skip to content
agershun edited this page Dec 13, 2014 · 9 revisions

SELECT FROM

    alasql('SELECT * FROM cities');
    var data = [{city:"Boston"}, {city:"Los Angeles"}];
    alasql('SELECT * FROM ? ORDER BY city',[data]);

You can also get data from stdin stream (for Node.js only). For example, how to calculate number of lines in incoming text file:

    alasql('SELECT COUNT(*) FROM TXT()');
Clone this wiki locally