Skip to content

Instantly share code, notes, and snippets.

View mpartipilo's full-sized avatar
🐣

Michelangelo Partipilo mpartipilo

🐣
View GitHub Profile
with
world_ccu as (select _ from (select cm._, rank() over (partition by cm.world_id order by cm.created_at desc) as r from ccu_metrics cm) tccu where tccu.r = 1),
world_mau as (select c.world_id, count(c.id) from "characters" c group by c.world_id),
world_queue_tickets as (select q.world_id, count(q.id) as queue_length, max(AGE(q.last_check, q.created_at)) as queue_wait from queue_tickets q group by q.world_id)
select to_char(now() at time zone 'utc', 'YYYY/MM/DD HH24:MI:SS') as snapshotTime, w.id, w.vip, w.region, w.world_uuid, to_char(w.created_at at time zone 'utc', 'YYYY/MM/DD HH24:MI:SS') as worldCreatedDate, t2.count as mau, t1.count as ccu, coalesce(t3.queue_length,0) as queue_length, coalesce(t3.queue_wait, now() - now()) as queue_wait, to_char(t1.created_at at time zone 'utc', 'YYYY/MM/DD HH24:MI:SS') as lastCCUUpdate
from worlds w
inner join world_ccu as t1 on (t1.world_id = w.id)
inner join world_mau as t2 on (t2.world_id = w.id)
left join world_queue_tickets as t3 on (t3.world_id =
import React from "react"
import PropTypes from "prop-types"
import ReCAPTCHA from "react-google-recaptcha"
import axios from "axios"
class ContactPageForm extends React.Component {
constructor(props) {
super(props)
this.state = {