Flipside Docs

Query Editor

Where the work happens: run SQL queries, get results, visualize them, and publish them on a dashboard, all from one place in the app
This section will cover:

Overview of the Editor

The editor is composed of three main panels - query, results, and charts. To the left of these panels, you have access to My Work or the Data Explorer. To the top, you can see all the queries and dashboards you've opened in tabs.
Work interface.
Configure your Interface.
Focus on different panels as you go through your workflow by expanding/collapsing panels. Here are three ways you can do that:
  • Click & Drag: click and drag the dividers between panels.
  • Double-click to maximize: double click on the header of each panel to maximize that panel.
  • Expand/Collapse button: click on the expand/collapse button on the top-right corner of each panel to expand or minimize it.

The Query Panel

This is where you input your SQL + Run it. Here are some features of the query panel.
  • Auto-Complete: start typing and the auto-complete feature will bring up Snowflake SQL keywords as well as database, schema, and table names.
  • Select & Run: select and highlight any part of your code to only run that snippet to see the "Selection Result" in the results panel.
  • Parameterized Queries: implement variables in certain parts of your code instead of hard-coding values like contract addresses, symbols, or date ranges. These values are also adjustable from the dashboard, letting readers interact with your dashboard by entering values they care about.
    To insert a parameter, you can click the "+ Parameter" button or simply type {{parameter_name}} and manage your parameters at the bottom of the query panel.
  • Auto-Format: make your query more readable by using the auto-format button!

The Results Panel

This is where you'll see the data you queried. To get results, write your SQL in the query panel and hit the blue play button in the top right corner. Or, you can run a query using your keyboard shortcut: cmd + enter (mac) or ctrl + enter (windows/linux).
The results panel is also where you'll see an error message if your query fails. There will be detailed feedback that will give you an idea of how to update your query. Here are a couple more things you can do through the results panel.
  • Rotate a table: if your table is super wide, you may want to rotate it to get a better sense of the columns in it.
  • Download results as CSV: download queried results and analyze them in your preferred tool.
  • Add to Dashboard: add the results table to your dashboard.

The Charts Panel

This is where you visualize your data. Using the Flipside App, you can create a Bar, Area, Line, Scatter, Big Number, or Donut chart.
The chart editor will give you some initial guidance on how to get started.
Here's a quick reference on when to choose which chart:
  • Bar — when comparing quantities across categories, and / or over time.
  • Area — when comparing quantities over time (or proportions of a whole over time, if you choose stack + normalize).
  • Line — when you want to visualize a trend, or movement in some measure, over time, and especially when the dimension measures are evenly spaced (like: a value exists for every week, day or hour — price charts or rates are good examples of this, vs. transactions which are more sporadic).
  • Scatter — when comparing independent variables or sets of numbers, and when you think there's likely to be some relationship between them (e.g., time vs. nft sale prices vs gas prices); a great choice for exploring complex or multi-dimensional data before committing to an approach.
  • Big Number — quite simply: when you want to show just one number.
  • Donut — when you need to show the share of a set of constituent parts relative to the whole, and only then (e.g., % of NFTs minted in a collection that have been held vs. sold).