Skip to content

SQL to find start and end date for an ID

I have a table with ID, start_date and end_date columns. Table: I want to write a query to get the following output: Output: Answer You can do a cumulative sum to solve this variation of the gaps-and-island problem: Demo on DB Fiddle: ID | START_DATE | END_DATE -: | :——— | :——&#8…

MySQL Query Help for Multiple Tables

Alright so I’m working on a final assignment and I’m super stuck on this one task. I’ve tried looking it up and reading guides and I got nowhere. To make matters worse, my professor hasn’t bothered to teach us how to do this particular type of task and I can’t bother asking him f…

Is it possible to create Azure SQL Database master master replication

I am sorry because I’m new to use Azure service. I want two SQL databases (one in Southeast Asia and one in Central US) for high availability or replication master-master. Now I just found two ways to sync both databases. Azure Geo-Replication but the problem is this method use master-slave replication.…