getting records for yesterday day starting till ending PostgreSQL
You need to cast created_at as a date - that will remove the time. 

now() also contains a time, so you need to use current_date

And finally your IN (..) is not needed, you can apply that condition directly in the where clause:

select camera_id, count(*) as snapshot_count 
from snapshots 
where created_at::date = current_date - 1
group by camera_id;




Note that the above will not use an index on created_at. If the performance is not acceptable and the condition would benefit from using an index, you can use something like this:

select camera_id, count(*) as snapshot_count 
from snapshots 
where created_at &gt;= date_trunc('day', current_timestamp) - interval '1' day
  and create_at &lt; date_trunc('day', current_timestamp)
group by camera_id;