diff --git a/content/04-postgresql/11-date-types.mdx b/content/04-postgresql/11-date-types.mdx index e5e84920..1f01f31d 100644 --- a/content/04-postgresql/11-date-types.mdx +++ b/content/04-postgresql/11-date-types.mdx @@ -126,7 +126,7 @@ Depending on the requirements of a system, you may need a date formatted in a sp ### Get the interval between two dates -PostgreSQL allows you to get the [interval](https://www.postgresqltutorial.com/postgresql-interval/) between two dates using the `-` operator. Using this operator allows you to calculate things like the tenure of an employee or time since the publishing of a book. +PostgreSQL allows you to get the [interval](https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-interval/) between two dates using the `-` operator. Using this operator allows you to calculate things like the tenure of an employee or time since the publishing of a book. In our example we want to find how many days it's been since Joyce's Ulysses was published by subtracting the current date from the `published_date`: diff --git a/content/04-postgresql/12-inserting-and-modifying-data/01-inserting-and-deleting-data.mdx b/content/04-postgresql/12-inserting-and-modifying-data/01-inserting-and-deleting-data.mdx index 2d19c45b..521406c6 100644 --- a/content/04-postgresql/12-inserting-and-modifying-data/01-inserting-and-deleting-data.mdx +++ b/content/04-postgresql/12-inserting-and-modifying-data/01-inserting-and-deleting-data.mdx @@ -367,7 +367,7 @@ WHERE EXISTS ( subquery );
How do I delete duplicate rows in PostgreSQL? -There are [several methods for deleting duplicate rows](https://www.postgresqltutorial.com/how-to-delete-duplicate-rows-in-postgresql/) in PostgreSQL. You can use a `DELETE USING` statement to check if two different rows have the same value and then delete the duplicate. +There are [several methods for deleting duplicate rows](https://www.postgresqltutorial.com/postgresql-tutorial/how-to-delete-duplicate-rows-in-postgresql/) in PostgreSQL. You can use a `DELETE USING` statement to check if two different rows have the same value and then delete the duplicate. In addition, you can use a subquery to delete duplicates or by using an immediate table with the listed steps: