# Peek SQL Code Challenge Submission ## Applicant Name ``` [your name here] ``` ## Additional Information You Would Seek Out There are many ways of modeling and approaching this problem, and there are many unknown factors that could determine which approach is better. Please list additional factors/information you would seek out. ``` [list all additional factors/information you would seek out] ``` ## Assumptions Made List all assumptions being made (regarding the above missing information or otherwise) ``` [list your assumptions here] ``` ## Data Model Schema Map out the data model schema you believe is best given the information you were provided and the assumptions you made. Feel free to organize however you like, no need to spend time formatting it to make it pretty, you can just have the table names and list of columns in each table. ``` [your chosen data model schema here] ``` ## Source Tables -> Desired Data Model - SQL Provide the SQL to transform the source data tables to your desired data model. This can be organized however you like, just add notes describing each snippet of SQL. ``` [Your SQL here] ``` ## Data Analyst Needs - SQL For each data analyst need, write the SQL to return the data from the example. The SQL should be based on your data model schema, not using source data tables. #### 1) Number of accounts with specific feature enabled over time For each day from 2/3/21 to 2/10/21, list the number of accounts that had the timeslot_caps feature flag enabled at the beginning of the day ``` [Your SQL here] ``` #### 2) Number of accounts that have feature activated and deactivated by day For each day from 2/3/21 to 2/10/21, list the number of accounts that had the timeslot_caps "activated" on that day, and number "deactivated" on that day. ``` [Your SQL here] ``` #### 3) List of all accounts with enabled status for a feature, and last change date List all accounts, whether they currently have the ios_waivers feature enabled, and the day it was changed to that status ``` [Your SQL here] ``` ## Any Other Thoughts/Comments Any additional comments/thoughts you have regarding the challenge or your submission, any thoughts on other tools you would consider using given the problem, etc. ``` [Your thoughts/comments here] ```