Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ [ClickBench] Timestamp functions on Unix Epoch timestamps #1702

Open
joocer opened this issue May 29, 2024 · 1 comment
Open

✨ [ClickBench] Timestamp functions on Unix Epoch timestamps #1702

joocer opened this issue May 29, 2024 · 1 comment

Comments

@joocer
Copy link
Contributor

joocer commented May 29, 2024

Functions which work on dates and timestamps generally don't work on Linux Epoch timestamps

extract(minute FROM EventTime)

┌────┬────────────┐
│    │ EventTime  │
│    │  INTEGER   │
╞════╪════════════╡
│  1 │ 1373834327 │
│  2 │ 1373913230 │
│  3 │ 1373914595 │
│  4 │ 1373914712 │
│  5 │ 1373833834 │
│  6 │ 1373841641 │
│  7 │ 1373916373 │
│  8 │ 1373917016 │
│  9 │ 1373912311 │
│ 10 │ 1373851126 │
└────┴────────────┘
@joocer
Copy link
Contributor Author

joocer commented May 31, 2024

and

SELECT URL, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND DontCountHits = 0 AND IsRefresh = 0 AND URL <> '' GROUP BY URL ORDER BY PageViews DESC LIMIT 10;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant