aarondanielsonbitcoin_bollinger_bands
Updated 2025-03-11Copy Reference Fork
999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
-- forked from Getting Started @ https://flipsidecrypto.xyz/studio/queries/8a78a23a-5d00-46f5-b194-6db4474e3972
-- Get started with Flipside by running your first query:
-- the SQL statement below will get you a list of NFT
-- platforms on Ethereum, ranked by how many sales
-- they've had in the past month.
-- Be sure to see our documentation for more guidance,
-- including a full walkthrough of the app:
-- https://docs.flipsidecrypto.xyz/our-app/getting-started
-- select
-- platform_name,
-- count(*) as sales_count
-- from ethereum.nft.ez_nft_sales
-- where block_timestamp > current_date - interval '30 days'
-- group by platform_name
-- order by sales_count desc
-- limit 8;
-- this is
-- SELECT
-- *,
-- DAYOFWEEK(HOUR) AS day_of_week
-- FROM bitcoin.price.ez_prices_hourly
-- WHERE HOUR > CURRENT_DATE - INTERVAL '94 days'
-- AND name = 'bitcoin'
-- ORDER BY HOUR DESC;
-- bollinger bands
-- compute the mean and standard deviation of the 14-day rolling window
-- compute upper and lower confidence intervals
-- return the last 168 days by creating a day since start column
-- WITH base_data AS (
-- SELECT
-- *,
-- DAYOFWEEK(HOUR) AS day_of_week
-- FROM bitcoin.price.ez_prices_hourly
-- WHERE HOUR > CURRENT_DATE - INTERVAL '182 days'
-- AND name = 'bitcoin'
-- )
QueryRunArchived: QueryRun has been archived