39
loading...
This website collects cookies to deliver better user experience
Import Table
button from the Arctype client.sales
. We also need to change the datatype of the year_of_release
column to int
and the global_sales
column to double
.Import CSV
button located at the bottom right of the pop-up.scorecard
Which shows a value on a card.Queries
tab by the Arctype sidebar (left side of the screen), then click on the Create Query
button.SELECT
COUNT(*) AS sales_count
FROM
sales;
Dashboards
tab by the Arctype sidebar (left side of the screen), then click on the Create Dashboard
button.top sales
and save the following code in it:SELECT
name,
global_sales AS sales
FROM
sales
ORDER BY
global_sales DESC
LIMIT 10;
platforms
and save the following code in it:SELECT
platform,
COUNT(*) AS platform_count
FROM
sales
GROUP BY
platform;
genres
and save the following code in it:SELECT
genre,
COUNT(*) AS genre_count
FROM
sales
WHERE
genre IS NOT NULL
GROUP BY
genre;
year_of_release
and save the following code in it:SELECT
year_of_release,
COUNT(*) as release_count
FROM
sales
WHERE
year_of_release IS NOT NULL
GROUP BY
year_of_release
ORDER BY
year_of_release;
publisher
and save the following code in it:SELECT
publisher,
COUNT(*) AS publisher_count
FROM
sales
GROUP BY
publisher
LIMIT 15;
Add
button at the header of the Dashboards
section and select Chart
.Select chart data
button and select the year_of_release
query we created earlier. Also, change the title of the dashboard component, select Bar Chart
as the chart type, and drag the year_of_release
column to the x-axis
box and the release_count
column to the y-axis
box.publisher
query:Add
button at the header of the Dashboards
section and select Chart
.annual_game_sales
and save the following code in it:SELECT
year_of_release,
SUM(global_sales) AS sales
FROM
sales
WHERE
year_of_release IS NOT NULL
GROUP BY
year_of_release
ORDER BY
year_of_release;
Line Chart
as the chart type, and drag the year_of_release
column to the x-axis
box and the sales
column to the y-axis
box.annual_game_sales
query. Click the Add
button at the header of the Dashboards
section and select Chart
.Area Chart
as the chart type, and drag the year_of_release
column to the x-axis
box and the sales
column to the y-axis
box.yearly_sales
and save the following code in it:SELECT
SUM(global_sales) AS year_sales
FROM
sales
WHERE
year_of_release = {{year}};
year
variable. This is because query variables prepare a query structure, then provide the functionality to pass different values to the variables to get desired results.yearly_sales
query with a query variable. To do this:yearly_sales
query as the data source,year_sales
column to the display text box.year
variable also appears by the right sidebar. Changing this value will instantaneously update the result of the scorecard.