Exercise · SQL & Querying
Predict, then run it
Predict the output
logs(id, ts_ms) stores a millisecond epoch (1700000000000). Convert it correctly by dividing to seconds first:
SELECT id, strftime(to_timestamp(ts_ms / 1000), '%Y-%m') AS ym FROM logs;
Predict the exact output.