H1 Interview Questions

H1 Interview Guides

Click or hover over a slice to explore questions for that topic.
Data Structures & Algorithms
(40)
Machine Learning
(12)
A/B Testing
(10)
Statistics
(8)
SQL
(7)

H1 Interview Questions

Practice for the H1 interview with these recently asked interview questions.

QuestionTopicDifficulty
SQL
Medium

You have a table containing information about the time that employees have worked on a project.

Write a query to find how many unique calendar days each employee worked. Order your query by the employee_id.

Example:

An employee worked on two projects, and recorded their time like this:

employee_id project_id start_date end_date
1 1 2024-01-01 2024-01-06
1 2 2024-01-03 2024-01-07

The number of unique calendar days is therefore 7.

Schema

Input:

projects table

Columns Type
employee_id INTEGER
project_id INTEGER
start_date DATE
end_date DATE

Output:

Columns Type
employee_id INTEGER
unique_days_worked INTEGER

Example

Input:

projects table

employee_id project_id start_date end_date
1 1 2024-01-01 2024-01-15
1 1 2024-01-21 2024-01-31
1 2 2024-01-25 2024-02-28
2 3 2024-01-01 2024-01-31

Output:

employee_id unique_days_worked
1 54
2 31
Data Structures & Algorithms
Easy
Data Structures & Algorithms
Medium
Loading pricing options

View all H1 questions

Challenge

Check your skills...
How prepared are you for working at H1?

Discussion & Interview Experiences

?
There are no comments yet. Start the conversation by leaving a comment.

Discussion & Interview Experiences

There are no comments yet. Start the conversation by leaving a comment.

Jump to Discussion