1 Determine the URL of your JSON data

For this example, we’re using the NICVA Marine Litter Survey database.

2 In Redash, open Data Sources Settings

3 Create a new Data Source

4 Fill out the details for the data source

5 Create another new Data Source

6 Create the Source query

7 Create the visualisation query

The SQL in the above screenshot is:

SELECT
    substr(Date, 7, 4) || '-' || substr(Date, 4, 2) || '-' || substr(Date, 1, 2) as Date,
    Category,
    sum(distinct Number) as SumVal
FROM query_1
GROUP BY 1, 2;

Take special care of the FROM clause: FROM query_1. The number 1 in query_1 is the query # you saved before.

So, if the number of the query you saved in the previous step was 234, your SQL query will need a FROM clause of FROM query_234.