nosql – SQL Question on User table

User Actions
Actions is a table that contains all interactions with content.
● userid identifies a specific user. the action_id identifies a specific action
● action_id uniquely identifies a specific action
○ Userid = 1 posted a photo that has action_id=100
● parent_action_id identifies the action that the current post is related to
○ userid=2 makes a comment which has action_id =101. They commented on user 1’s post so the parent_action_id = 100
● action_type what type of action is this? Comment, text, photo, story, etc.
● ds this is the date stamp. This tells what day this action occurred. It is in YYYY-MM-DD format so November 1, 2019 would be 2019-11-01

In SQL,

  1. how many photo posts were there on a specific date?
  2. how many photos had a comment?
  3. what percentage of photo posts had at least 1 comment?