Questions tagged [alasql]

Alasql - is a SQL database and data manipulation library, written in pure JavaScript and designed to work in browsers and Node.js. It provides a SQL language interface and data processing functions to data arrays. The library also provides import/export functions for CSV, TAB, JSON and other data file formats. It can use LocalStorage and IndexedDB as backend storage.

Alasql - 'à la SQL' - is a lightweight JavaScript SQL database designed to work in browser, Node.js, and Apache Cordova. It supports traditional SQL with some NoSQL functionality. Current version of Alasql can work in memory and use file, IndexedDB, and localStorage as a persistent storage.

See also

Useful links

225 questions
0
votes
0 answers

Alasql - Manifest V3 migration error - doesn't allow content scripts to use eval() and friends

I'm having trouble executing eval() and friends for alasql, it is not supported to manifest v3 migration for chrome extension. Based from their Manifest V3 migration checklist: You can no longer execute external logic using…
0
votes
1 answer

WHERE IN (SELECT) statement breaks query, when there is a WITH statement present

This works perfectly: SELECT qaer_name, AVG(Minutes(QA_Time)) AS avg_minutes, COUNT(Zendesk_URL) AS num_tickets FROM zendeskData WHERE qaer_name IN (SELECT Name FROM qaers) AND tags LIKE '%cosmetic%' AND…
2me
  • 3
  • 4
0
votes
1 answer

Try to import one cell from XLS table with alasql

Ok I got it but now i cant use variable(nomer) into WHERE. Variable set in function and its just number my code: var nomer element.addEventListener( 'click', function (textbase, input ) { nomer = element.id; setPrice(nomer); …
0
votes
1 answer

How to extract values from multiple tables in SQL an and IN condition?

I have three tables with data for which I want to get a combined overview created using an SQL query. The first table "Epics" conists of a column with key values and another column which contains a list of keys. The second and third tables contain a…
taocp
  • 123
  • 3
0
votes
2 answers

alasql xlsx export problems

I am new to alasql and I would like to export several data in specific cell using alasql, for example data1 goes do D4, data2 goes to G3, ..., data_n goes to F3 To do that I use the following javascript/alasql code: window.saveFile = function…
N_G
  • 15
  • 5
0
votes
1 answer

Alasql - group by and take the maximum result

I have a table in the below format: Vendor Id Weight AAA 1 1234 AAA 1 121 AAA 2 5182 BBB 1 311 BBB 1 9132 BBB 2 108 I need to group by "Vendor" and "Id" and sum the "Weight". Whichever "Id" has the maximum "Weight"…
user3447653
  • 3,968
  • 12
  • 58
  • 100
0
votes
1 answer

Group by and filter based on sum of a column in google apps script

I am trying to group by vendor and id and take the sum of total weight from the below table: Vendor Id Weight AAA 1 1234 AAA 1 121 AAA 2 5182 BBB 1 311 BBB 1 9132 BBB 2 108 In the below query, variable 'row'…
user3447653
  • 3,968
  • 12
  • 58
  • 100
0
votes
0 answers

Parse error on AlaSQL library in Google Apps Script

I read a table, do some filtering and the results are in an object called "row". let row=[]; vs.forEach((r,i)=>{ if(dtv>=frv && dtv<=tov && id==r[0] && (r[12] == Suppliers[0] || r[12] == Suppliers[1] || r[12] == Suppliers[2])) …
user3447653
  • 3,968
  • 12
  • 58
  • 100
0
votes
0 answers

AngularJS Table Column Search...smarter ideas?

I have to use AngularJS to build a dashboard and one of the components is a table. Since I did not find relevant dependencies/libraries for angularjs (like tabulator or datatables), I am doing it myself. Instead of using the native angular filter, I…
Mauro
  • 102
  • 14
0
votes
0 answers

I am trying to export data to excel

I am trying to export data to excel .using alasql but i am getting [object object] in excel sheet . var sql = 'SELECT INTO XLSX("' + dashboardName + '.xlsx",?) FROM ?'; var res = alasql(sql, [sheetNames, exportData]);
Raj Dugar
  • 13
  • 2
0
votes
1 answer

ATTACH INDEXEDDB DATABASE always fails on first try and succeeds on second

I am not sure what if anything I am doing wrong or if this is a bug. My IndexedDB exists and has data in it. I am currently using alasql to query the data AFTER i retrieve it from IndexedDB, however I would much rather do this in a singe step as…
olaf
  • 11
  • 3
0
votes
1 answer

Select from JSON object with colon in key using alasql

I have this dataset: [ { "date": "2020-06-07", "data": { "publish": true, "publish:title": "Hello world from tempo!" } }, { "date": "2020-06-07", "data": null }, { "date": "2020-06-07", "data": null …
Agate
  • 3,152
  • 1
  • 19
  • 30
0
votes
2 answers

How to LEFT JOIN two external JSON url

I'm trying to accomplish below result using external JSON. I searched on google and stackverflow and i couldn't find any answer. Can anyone help me on this? Thank you in advance. people = [{id: 1, name: "Tom", carid: 1}, {id: 2, name: "Bob", carid:…
James
  • 47
  • 1
  • 5
0
votes
0 answers

How to compare dates in alasql in GAS?

I am having trouble trying to compare dates in my AlaSql query in Google Scripts. I tried different codes. But no one work. I have one google spreadsheet and I need to get query from it. I want to filter by Col15 with dates. Dates in spreadsheets…
0
votes
0 answers

How to configure query conditions by date in alasql. Google Scripts + AlaSql

I am writing a Google script. I'm using AlaSql. It is necessary to make a request with a filter by date. But I don’t understand how to convert the date. The result is incorrect. Пишу гугл скрипт. Использую AlaSql. Надо сделать запрос с фильтром по…