How to get started querying data with the Flipside Studio.
To get started, create an account on our app — you can sign up using an email address, ETH address, or your discord account.
The account sign-up link is in the bottom left-hand corner of the page.
Navigate to the "Studio" from the top nav, then you can create a new query by clicking the big blue "+" button in the side bar, then selecting "Query".
Easiest way to create a new query is to click the big blue button.
You can also create new queries in a few other ways:
Doing this will drop you into the Studio, with your new query open:
Brand new query, ready for SQL.
A few things to note here:
- By default, your query is named the date and time it was created. You can rename it by clicking on its name in the query task bar (above the code editor and below the tabs).
- The "My Work" menu will be expanded in the left sidebar, and a new line representing your query will be added to it. Here you can organize your queries, search them by title, and navigate between them. More on that later.
- When you create a fresh query, your cursor will be focused in the code editor. Here you can enter SQL to query the various blockchain databases on offer. How do you know which databases to query, though? Well...
From the side menu, navigate to the Data Explorer to see all the databases, schemas and tables available to you — there is typically one database dedicated to each blockchain we cover. For now, let's take a look at one of our Ethereum core tables: so click Ethereum, then Core, then "ez_token_transfers" to expand that table's details.
Pro tips for data exploration:
- Column details: click on the table name to see a list of it's columns, and a data type for each.
- Table details: hover over a table name to see the table description and access direct link to documentation.
- Table preview: see sample data without writing any SQL by clicking the Preview icon.
- Add to query: enter any table name into your SQL with a single mouse click.
- View docs: hover over a database name and click the "book" icon to go direct to docs.
The data explorer is the easiest way to find tables, check out their contents, and add them to your query.
Now let's run a query from ethereum.core.ez_nft_sales. Here's one you can use, that gets the top 8 NFT platforms on Ethereum by total sales in the past 30 days:
count(*) as sales_count
where block_timestamp > current_date - interval '30 days'
group by platform_name
order by sales_count desc
Paste that into the code editor (and modify it if you like: maybe change the "limit" and get top 10 instead of 8, or change the "interval" to get total sales from the past week instead of month?) and you're ready to go.
To run your query, you can hit the big blue "play" button in the top right-hand corner, or use a keyboard shortcut:
- Mac: CMD + ENTER
- PC or Linux: CTRL + ENTER
After a few moments, you should see your results appear in the Results Panel — you've got data!
Your screen should look something like this at this point.
Let's take a look at what the table above is telling us! Click "Add Chart" on the bottom of the screen to fire up the chart builder. For this example, we'll choose Bar chart from the chart type menu, then set a few options to get started:
- for X Axis, select "PLATFORM_NAME"
- for Y Axis (Bar), select "SALES_COUNT"
- for Group By Value, select "PLATFORM_NAME"
Your screen should look something like this:
You've got a chart!
Now that you have your results and a basic chart, you can tie everything together by creating a dashboard. Click the "add to dashboard" icon in the chart panel, then click "+ New Dashboard" to get started:
"Add to dashboard" is the quickest way to get a new chart into a dashboard.
This interface lets you find an existing dashboard to add your chart to, or instantly create a new one.
Your new dashboard is ready to edit! It should look something like this.
There are many ways to customize a dashboard — you can add text boxes, charts, tables, and images to your dashboard to showcase what you've discovered, resize and arrange them as you see fit, and even organize them in tabs.
For now, we'll stick to the basics — let's give this dashboard a name! Click the default assigned name (the date and time the dashboard was created) and name it something appropriate like "NFT Platform Sales Walkthrough".
Click the big timestamp and name it something appropriate.
Make any other changes you see fit:
- Action Bar: you can add text, images, or charts from the action bar at the bottom of the page.
- My Work: you can also drag charts and results tables onto the dashboard from My Work.
- Tabs: finally you can create additional pages or "tabs" in your dashboard to help organize your work by clicking the "Activate Tab Mode" box, and then adding tabs with the + button, and editing or removing them with the gear icon.
Once you're happy with your dashboard, hit the publish button on the top right corner — after a short delay, you should see a confirmation like this:
Your dashboard publish confirmation shows you a preview of how your dashboard will appear when shared on the web.
Now that your dashboard is published, you can find it in Discover:
Click that Discover link!
There are a few ways to find your dashboard in discover, here's the easiest one:
- 1.Click "Analysts" to find your account in the Analyst Leaderboard.
- 2.Click "Search" and enter your username to find your profile.
- 3.Click your profile card to go to your profile page.
- 4.Your dashboard should show up near the top!
Get to the analysts section and search for your profile to find your dashboard.
Congrats — you've published!
- Edit your profile — add contact information, customize your avatar and background image.
- Get inspired — go back to Discover and scope out the trending work: filter by a project you're interested in, and see what the best analysts in crypto are making on Flipside. Oh, and if you see something you like, be sure to hit that ❤️ button — "likes" impact the rankings and you'll help more people see good work by voting for things you enjoy.