FORUM Data Analytics

Data Analytics

Let’s discuss how to extraxt meaningful insights from data, how to automate our analysis and dashboards, how to build SQL alerts and make data talk to us 📊
ASK QUESTION All Questions Solved Unsolved
Fernanda
4 months
SOLVED

How can I do to calculate working days between two dates?

Hello, I have a questions and it is…

I have created_date and resolved_date as columns in tickets table. In other table I have sat_calendar with all days since 2020-06-01 and I identified Sunday, Saturdays and Holidays in description column.

But now I need to calculate difference between created_date and resolve_date in working_days.

I did new table with row_number to working_day but I couldn’t do put ‘the previuos’ number if the created or resolved date is some holiday.

Could someone help me please?

1
Join the discussion
SQL Habit Course
Pricing Gift Cards Buy for team For Students For Product Managers For Marketers For Data Analysts Blog Mock Interviews Forum Job Board Data Analysis Skill test
About
Meet the author How it works FAQ Table of Contents Practice Exercises Datasets Metrics & KPIs Reference User reviews
Information
Privacy Policy Terms of Service Cookie Policy Support Partners
© 2023 SQL Habit, made with ❤ by Anatoli Makarevich