{"version":"1.0","type":"rich","title":"example script to upload any csv and run sql queries against the data in the browser","description":"This example loads a user-selected CSV file through an HTML file input and stores its contents in an in-browser SQL database using the sql.js library, which compiles SQLite to JavaScript. It infers each column’s data type—integer, float, boolean, date, or text—from the first non-empty value, then dynamically creates a table and inserts rows. After import, the code runs a sample SQL query with a bound parameter (e.g., counting rows by a last name) and logs the result to the console, demonstrating how to execute arbitrary SQL against uploaded tabular data entirely client-side.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-955026f56fb3450b7995526b631f3864?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}