{"slug":"ex-dividend-calendar-from-the-free-sql-api","qid":"next_fourteen","label":"next_fourteen","post_title":"ex-dividend-calendar-from-the-free-sql-api","post_url":"/blog/ex-dividend-calendar-from-the-free-sql-api#q-next_fourteen","columns":["ticker","goes_ex","payable","cash_amount"],"rows":[{"ticker":"GGLL","goes_ex":"Sep 22","payable":"Sep 29","cash_amount":0.6053},{"ticker":"TZA","goes_ex":"Sep 22","payable":"Sep 29","cash_amount":0.47334},{"ticker":"SOXS","goes_ex":"Sep 22","payable":"Sep 29","cash_amount":0.43641},{"ticker":"NUGT","goes_ex":"Sep 22","payable":"Sep 29","cash_amount":0.39601},{"ticker":"TMF","goes_ex":"Sep 22","payable":"Sep 29","cash_amount":0.35062},{"ticker":"SPXS","goes_ex":"Sep 22","payable":"Sep 29","cash_amount":0.33865},{"ticker":"SPXL","goes_ex":"Sep 22","payable":"Sep 29","cash_amount":0.31028},{"ticker":"MUU","goes_ex":"Sep 22","payable":"Sep 29","cash_amount":0.20279},{"ticker":"AAPD","goes_ex":"Sep 22","payable":"Sep 29","cash_amount":0.17786},{"ticker":"METU","goes_ex":"Sep 22","payable":"Sep 29","cash_amount":0.17184},{"ticker":"APH","goes_ex":"Sep 22","payable":"Oct 14","cash_amount":0.125},{"ticker":"SPDN","goes_ex":"Sep 22","payable":"Sep 29","cash_amount":0.11525},{"ticker":"SOXL","goes_ex":"Sep 22","payable":"Sep 29","cash_amount":0.0929},{"ticker":"STM","goes_ex":"Sep 22","payable":"Sep 29","cash_amount":0.09},{"ticker":"TSLL","goes_ex":"Sep 22","payable":"Sep 29","cash_amount":0.07077}],"shape":"ranking","sql":"WITH liquid AS\n(\n    SELECT ticker\n    FROM global_markets.stocks_daily_aggs\n    WHERE date >= today() - 45\n    GROUP BY ticker\n    HAVING avg(toFloat64(close) * volume) > 1e8\n)\nSELECT\n    ticker,\n    formatDateTime(ex_dividend_date, '%b %e')  AS goes_ex,\n    formatDateTime(any(pay_date), '%b %e')     AS payable,\n    max(cash_amount)                           AS cash_amount\nFROM global_markets.stocks_dividends\nWHERE ex_dividend_date >= today()\n  AND ex_dividend_date <  today() + 14\n  AND currency = 'USD'\n  AND ticker IN (SELECT ticker FROM liquid)\n  AND ticker NOT IN ('SPCX')\nGROUP BY ticker, ex_dividend_date\nORDER BY ex_dividend_date, cash_amount DESC, ticker\nLIMIT 15","computed_at":"2026-09-22T14:44:21.213033+00:00","elapsed":1.175128393}