Relate to Group by function and data shown

question: the table show timestamp column, i dont group by them but they show, i want to ask why they show that information but not others?

https://www.codecademy.com/paths/data-science/tracks/sql-intermediate/modules/dspath-sql-aggregates-projects-and-applications/projects/sql-hackernews

can you access this link? task 9 to 11

my script:

SELECT timestamp, strftime(’%H’, timestamp), round(avg(score)) as avgscore, count(*)
FROM hacker_news
where timestamp is not null
GROUP BY 2
order by 2;

thanks

Hi There. If you don’t want timestamp to show, just don’t type it on SELECT. Here’s how your code would be without timestamp:

SELECT strftime('%H', timestamp) AS Hour, ROUND(AVG(score),0) AS avgscore, COUNT(*)
FROM hacker_news
WHERE timestamp IS NOT NULL
GROUP BY 1
ORDER BY 2 DESC;

hi, thanks but i just ask that why when i select timestamp and they show like that?

I can’t see your exercise. But running your script I see this:

timestamp format is on the source format. You need to use strftime to set your format. This is a usefull link: strftime reference