{"id":21306657,"url":"https://github.com/brian-emarquez/postgresql-training","last_synced_at":"2025-08-31T09:37:51.678Z","repository":{"id":37355645,"uuid":"369315199","full_name":"brian-emarquez/PostgreSQL-Training","owner":"brian-emarquez","description":"Learn PostgreSQL and how to get started quickly through practical examples.","archived":false,"fork":false,"pushed_at":"2024-05-31T21:11:04.000Z","size":13887,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-11T21:36:09.936Z","etag":null,"topics":["pgadmin4","postgresql"],"latest_commit_sha":null,"homepage":"https://github.com/brian-emarquez","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brian-emarquez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-20T19:21:21.000Z","updated_at":"2024-05-31T21:11:07.000Z","dependencies_parsed_at":"2024-05-31T22:38:46.769Z","dependency_job_id":null,"html_url":"https://github.com/brian-emarquez/PostgreSQL-Training","commit_stats":null,"previous_names":["brian-emarquez/postgresql-training"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/brian-emarquez/PostgreSQL-Training","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brian-emarquez%2FPostgreSQL-Training","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brian-emarquez%2FPostgreSQL-Training/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brian-emarquez%2FPostgreSQL-Training/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brian-emarquez%2FPostgreSQL-Training/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brian-emarquez","download_url":"https://codeload.github.com/brian-emarquez/PostgreSQL-Training/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brian-emarquez%2FPostgreSQL-Training/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272965432,"owners_count":25023066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pgadmin4","postgresql"],"created_at":"2024-11-21T16:27:22.561Z","updated_at":"2025-08-31T09:37:51.637Z","avatar_url":"https://github.com/brian-emarquez.png","language":null,"readme":"\u003ch2 align=\"center\"\u003e 🐘 PostgreSQL Training \u003c/h2\u003e\r\n\r\n\u003cp align=\"center\"\u003e\r\n  \r\n  \u003c/a\u003e\r\n    \u003cimg src=\"https://img.shields.io/github/languages/top/BrianMarquez3/PostgreSQL-Training?color=red\"\u003e\r\n  \u003c/a\u003e\r\n  \u003ca href=\"https://github.com/brian-emarquez/PostgreSQL-Training/stargazers\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/github/stars/BrianMarquez3/PostgreSQL-Training.svg?style=flat\" alt=\"Stars\"\u003e\r\n  \u003c/a\u003e\r\n  \u003ca href=\"https://github.com/brian-emarquez/PostgreSQL-Training/network\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/github/forks/BrianMarquez3/PostgreSQL-Training.svg?style=flat\" alt=\"Forks\"\u003e\r\n  \u003c/a\u003e\r\n    \u003cimg src=\"https://img.shields.io/github/v/tag/BrianMarquez3/PostgreSQL-Training?color=blue\u0026label=Version\u0026logo=PostgreSQL\"\u003e\r\n  \u003c/a\u003e\r\n  \u003c/a\u003e\r\n    \u003cimg src=\"https://img.shields.io/github/languages/code-size/BrianMarquez3/PostgreSQL-Training\"\u003e\r\n  \u003c/a\u003e\r\n  \u003c/a\u003e\r\n    \u003cimg src=\"https://img.shields.io/github/downloads/BrianMarquez3/PostgreSQL-Training/total?color=blue\"\u003e\r\n  \u003c/a\u003e\r\n  \u003c/a\u003e\r\n   \u003ca href=\"https://github.com/brian-emarquez/PostgreSQL-Training/network\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/badge/Plataform-Windows-blue\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/badge/Plataform-Linux-darkblue\"\u003e\r\n  \u003c/a\u003e\u003cbr\u003e\r\n  \u003cimg src=\"https://img.shields.io/github/last-commit/BrianMarquez3/PostgreSQL-Training?color=darkblue\u0026style=for-the-badge\"\u003e\r\n  \u003cimg src=\"https://img.shields.io/github/languages/count/BrianMarquez3/PostgreSQL-Training?style=for-the-badge\"\u003e\r\n\u003c/P\u003e\r\n\r\n\u003ctable align=\"center\"\u003e\r\n  \u003ctr\u003e\r\n    \u003ctd align=\"center\" style=\"padding=0;width=50%;\"\u003e\r\n      \u003cimg align=\"center\" style=\"padding=0;\" src=\"./images/postgres-main.jpg\" /\u003e\r\n    \u003c/td\u003e\r\n  \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n[PostgreSQL Documentation](https://www.postgresql.org/docs/current/index.html)\r\n\r\n## Table of Contents\r\n\r\n| Numeration   | Check       | Stiker        |    Topic      |   Quantization   |    Edit Gitpot    |    Downloads    |  link  |\r\n| ------------ |-------------|-------------- |----------------- |------------------ |---------------- |-------------- |------------- |\r\n|  001   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [Downloads](#Downloads)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  002   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [Usando la DB](#Usando-la-DB)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  003   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [Visualizar Informacion Tablas](#Visualizar-Informacion-Tablas)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  004   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [SELECT](#SELECT)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  005   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [SELECT DISTINCT](#SELECT-DISTINCT)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  006   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [SELECT COUNT](#SELECT-COUNT)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  007   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [WHERE](#WHERE)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  008   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [ORDER BY](#ORDER-BY)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  009   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [LIMIT](#LIMIT)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  010   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [BETWEEN](#BETWEEN)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  011   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [IN](#IN)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  012   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [LIKE](#LIKE)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  013   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [HAVING](#HAVING)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  014   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [GROUP BY](#GROUP-BY)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  015   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [AS](#AS)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n\r\n\r\n## Union de Tablas\r\n\r\n| Numeration   | Check       | Stiker        |    Topic      |   Quantization   |    Edit Gitpot    |    Downloads    |  link  |\r\n| ------------ |-------------|-------------- |----------------- |------------------ |---------------- |-------------- |------------- |\r\n|  016   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/6cnivQlC5qOyC8srhm/giphy.gif\" width=\"25px\"\u003e | [AS](#AS)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  017   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/6cnivQlC5qOyC8srhm/giphy.gif\" width=\"25px\"\u003e | [INNER JOIN](#INNER-JOIN)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  018   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/6cnivQlC5qOyC8srhm/giphy.gif\" width=\"25px\"\u003e | [FULL JOIN](#FULL-JOIN)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  019   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/6cnivQlC5qOyC8srhm/giphy.gif\" width=\"25px\"\u003e | [LEFT JOIN](#LEFT-JOIN)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  020   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/6cnivQlC5qOyC8srhm/giphy.gif\" width=\"25px\"\u003e | [RIGHT JOIN](#RIGHT-JOIN)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  021   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/6cnivQlC5qOyC8srhm/giphy.gif\" width=\"25px\"\u003e | [UNION](#UNION)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n\r\n## Funciones \r\n\r\n| Numeration   | Check       | Stiker        |    Topic      |   Quantization   |    Edit Gitpot    |    Downloads    |  link  |\r\n| ------------ |-------------|-------------- |----------------- |------------------ |---------------- |-------------- |------------- |\r\n|  022   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/9DaWtzJV7WZpxQVzNz/giphy.gif\" width=\"25px\"\u003e | [Formato Hora Fecha](#Formato-Hora-Fecha)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  023   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/9DaWtzJV7WZpxQVzNz/giphy.gif\" width=\"25px\"\u003e | [Funciones Matematicas](#Funciones-Matematicas)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  024   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/9DaWtzJV7WZpxQVzNz/giphy.gif\" width=\"25px\"\u003e | [Funciones Caracteres](#Funciones-Caracteres)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  025   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/9DaWtzJV7WZpxQVzNz/giphy.gif\" width=\"25px\"\u003e | [Subconsulta Valor numerico](#Subconsulta-Valor-numerico)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  026   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/9DaWtzJV7WZpxQVzNz/giphy.gif\" width=\"25px\"\u003e | [Subconsulta por lista de Valores](#Subconsulta-por-lista-de-Valores)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  027   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/9DaWtzJV7WZpxQVzNz/giphy.gif\" width=\"25px\"\u003e | [Subconsulta con EXITS](#Subconsulta-con-EXITS)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n\r\n## Base de Datos\r\n\r\n| Numeration   | Check       | Stiker        |    Topic      |   Quantization   |    Edit Gitpot    |    Downloads    |  link  |\r\n| ------------ |-------------|-------------- |----------------- |------------------ |---------------- |-------------- |------------- |\r\n|  028   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [Bases de Datos](#Bases-de-Datos)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  029   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [Crear Tabla SQL](#Crear-Tabla-SQL)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  030   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [Insert SQL](#Insert-SQL)   | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  031   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [UPDATE](#UPDATE )  | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  032   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [DELETE](#DELETE )  | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  033   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [ALTER](#ALTER )  | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  034   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [CASE](#CASE )  | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  035   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [COALESCE](#COALESCE)  | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  036   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [CAST](#CAST)  | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  037   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [Importar Ficheros](#Importar-Ficheros)  | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n|  038   |:heavy_check_mark: |\u003cimg src=\"https://media.giphy.com/media/W08c7xFA4ryiC90jNf/giphy.gif\" width=\"25px\"\u003e | [Exportar Ficheros](#Exportar-Ficheros)  | ✔️    | 💻 | 💾 | [ ⬅️ back](https://github.com/brian-emarquez)| \r\n\r\n---\r\n\r\n## Downloads\r\n\r\n⚙️ [Install PostgreSQL Linux ](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-20-04-es) How to install and use PostgreSQL on Ubuntu\u003cbr\u003e\r\n⚙️ [Install PostgreSQL Windows](https://www.postgresql.org/download/windows/) Download the installer for windows \u003cbr\u003e\r\n\r\n\u003ctable align=\"center\"\u003e\r\n  \u003ctr\u003e\r\n    \u003ctd align=\"center\" style=\"padding=0;width=50%;\"\u003e\r\n      \u003cimg align=\"center\" style=\"padding=0;\" src=\"./images/Home.png\" /\u003e\r\n    \u003c/td\u003e\r\n  \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n\u003ctable align=\"center\"\u003e\r\n  \u003ctr\u003e\r\n    \u003ctd align=\"center\" style=\"padding=0;width=50%;\"\u003e\r\n      \u003cimg align=\"center\" style=\"padding=0;\" src=\"./images/homePS.png\" /\u003e\r\n    \u003c/td\u003e\r\n  \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n**Correccion del Error PATH** \u003cbr\u003e\r\n\r\n_Cambiar la Direccion del PATH de PostgreSQL_\r\n\r\n\u003ctable align=\"center\"\u003e\r\n  \u003ctr\u003e\r\n    \u003ctd align=\"center\" style=\"padding=0;width=50%;\"\u003e\r\n      \u003cimg align=\"center\" style=\"padding=0;\" src=\"./images/SolucionErrorPath.png\" /\u003e\r\n    \u003c/td\u003e\r\n  \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n## Linux installation - Ubuntu (Intallation/Comandos)\r\n\r\n* [Comandos consola Postgres](https://apuntes-snicoper.readthedocs.io/es/latest/programacion/postgresql/comandos_consola_psql.html) \r\n\r\n**Install Postgres**\r\n\r\n* [Install Postgres Actual en Ubuntu](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-20-04-es)\r\n\r\n* [Install Postgres 14 en Ubuntu](https://techviewleo.com/how-to-install-postgresql-database-on-ubuntu/)\r\n\r\n* [Install Docker](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04-es)\r\n\r\n* [Install Doker Compose](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-04)\r\n\r\n**Delete Postgres**\r\n\r\n* [Uninstall ubuntu Terminal Postgres Simple](https://www.enmimaquinafunciona.com/pregunta/30210/como-quitar-a-postgres-de-mi-instalacion)\r\n* [Eliminar Postgres Completamente](https://www.enmimaquinafunciona.com/pregunta/30210/como-quitar-a-postgres-de-mi-instalacion)\r\n\r\n**Restore Database**\r\n\r\n```sql\r\npg_restore -h 127.0.0.1 -p 5432 -U user -d database \u003c backup.sql\r\npsql -h 127.0.0.1 -p 5432 -U user -W -d dabatase \u003c backup.sql\r\n```\r\n\r\n**Backup Base de Datos**\r\n\r\n```sql\r\npg_dump -U postgres -W -h 127.0.0.1 database \u003e backup.sql\r\n```\r\n\r\n**Create Postgres Password**\r\n\r\n```bash\r\nsudo -u postgres psql\r\n\\password\r\nEnter password: ...\r\n```\r\n\r\n**Inicializar Postgres - Ubuntu terminal**\r\n\r\n```bash\r\n service postgresql start\r\n service postgresql status\r\n service postgresql stop\r\n ```\r\n\r\n **Usar Postgres**\r\n\r\n_Cambie a la cuenta de postgres_\r\n ```bash\r\nsudo -i -u postgres\r\n ```\r\n\r\n_Acceder de inmediato a una línea de comandos de PostgresSQL_\r\n```bash\r\npsql\r\n```\r\n\r\n_ver base de datos_\r\n_Acceder de inmediato a una línea de comandos de PostgresSQL_\r\n```bash\r\n\\l\r\n```\r\n\r\n_entrar a la base de datos_\r\n_Acceder de inmediato a una línea de comandos de PostgresSQL_\r\n```bash\r\n\\dt \u003cnasededatos\u003e\r\n```\r\n\r\n**Create Postgres User**\r\n\r\n* [DigitalOcean](https://www.digitalocean.com/community/tutorials/como-configurar-django-con-postgres-nginx-y-gunicorn-en-ubuntu-18-04-es)\r\n\r\n* [Como crear usuarios en PostgreSQL](https://www.todopostgresql.com/crear-usuarios-en-postgresql/)\r\n\r\n\r\n```sql\r\nCREATE USER newuser WITH PASSWORD 'password';\r\nGRANT ALL PRIVILEGES ON DATABASE database to newuser;\r\n```\r\n\r\n**Ver Usuarios**\r\n\r\n```sql\r\nSELECT usename FROM pg_user;\r\n```\r\n\r\n**Rename a database**\r\n\r\n```sql\r\nALTER DATABASE olddbname RENAME TO newdbname;\r\n```\r\n\r\n**Delete user postgres**\r\n\r\n* [Como crear usuarios en PostgreSQL](https://codeandoando.com/usuarios-y-permisos-en-postgresql/)\r\n\r\n**Configuration Information**\r\n\r\n\u003cP\u003e La utilidad postgresql pg_lsclusters muestra información sobre la configuración y el estado de todos los clusters, incluyendo el número de puerto. \u003c/P\u003e\r\n\r\n```sql\r\n$ pg_lsclusters\r\n```\r\n\r\n**Migrating from SQLite to Postgresql - Django**\r\n\r\nMigrating data from SQlite to PostgreSQL. Shift database from SQlite to PostgreSQL in Django\r\n[Migrating data from SQlite to PostgreSQL | Django](https://www.youtube.com/watch?v=BGEEzjGadYI\u0026ab_channel=StudyGyaan)\r\n\r\n_Data.json_\r\n\r\n```sql\r\npython manage.py dumpdata \u003e data.json\r\n```\r\n\r\n_Example Setting Django_\r\n\r\n```sql\r\nDATABASES = {\r\n    'default': {\r\n        'ENGINE': 'django.db.backends.postgresql_psycopg2',\r\n        'NAME': 'p2phelp_db',\r\n        'USER': 'briandb',\r\n        'PASSWORD': 'briandb',\r\n        'HOST': 'localhost',\r\n        'PORT': '5432'\r\n    }\r\n}\r\n```\r\n\r\n_Python Django Shell_\r\n\r\n```sql\r\npython manage.py migrate --run-syncdb\r\n```\r\n\r\n```sql\r\npython manage.py shell\r\n```\r\n\r\n```sql\r\nfrom django.contrib.contenttypes.models import ContentType\r\nContentType.objects.all().delete()\r\nexit()\r\n```\r\n\r\n```sql\r\npython manage.py loaddata data.json\r\n```\r\n\r\n---\r\n\r\n## Usando la DB\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|002         | [Usando la DB](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/002%20Usando%20la%20BD)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n## Visualizar Informacion Tablas\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|003         | [Visualizar Informacion Tablas](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/003%20Visualizar%20Informacion%20Tablas)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n## SELECT\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|004         | [SELECT](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/004%20SELECT)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n\r\n## SELECT DISTINCT\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|005         | [SELECT DISTINCT](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/005%20SELECT%20DISTINCT)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n\r\n## SELECT COUNT\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|006         | [SELECT COUNT](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/006%20SELECT%20COUNT)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n\r\n## WHERE\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|007         | [WHERE](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/007%20WHERE)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n## ORDER BY\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|008         | [ORDER BY](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/008%20ORDER%20BY)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n\r\n## LIMIT\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|009         | [LIMIT](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/009%20LIMIT)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n## BETWEEN\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|010         | [BETWEEN](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/010%20BETWEEN)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n## IN\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|011        | [IN](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/011%20IN)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n## LIKE\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|012        | [LIKE](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/012%20LIKE)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n## GROUP-BY\r\n\r\n```sql\r\nSELECT \"PRODUCTO\", SUM(\"IMPORTE\")\r\nFROM esquema.\"PEDIDOS\"\r\nGROUP BY \"PRODUCTO\"\r\n```\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|013        | [GROUP-BY](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/013%20GROUP%20BY)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n\r\n## HAVING\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|014        | [HAVING](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/014%20HAVING)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n## Union de Tablas\r\n\r\n## AS\r\n\r\n```SQL\r\nSELECT \"ID\" AS \"CLAVE\", \"PRODUCTO\" AS \"VALOR 0\", \"IMPORTE\"  AS \"VALOR 1\" \r\nfrom esquema.\"PEDIDOS\"\r\n```\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|015        | [AS](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/015%20AS)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n\r\n## INNER JOIN\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|016        | [INNER JOIN](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/015%20AS)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n## FULL JOIN\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|017        | [FULL JOIN](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/017%20FULL%20JOIN)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n## LEFT JOIN\r\n\r\n\u003ctable align=\"center\"\u003e\r\n  \u003ctr\u003e\r\n    \u003ctd align=\"center\" style=\"padding=0;width=50%;\"\u003e\r\n      \u003cimg align=\"center\" style=\"padding=0;\" src=\"./images/leftjoin.png\" /\u003e\r\n    \u003c/td\u003e\r\n  \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|018        | [LEFT JOIN](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/018%20LEFT%20JOIN)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n## RIGHT JOIN\r\n\r\n\u003ctable align=\"center\"\u003e\r\n  \u003ctr\u003e\r\n    \u003ctd align=\"center\" style=\"padding=0;width=50%;\"\u003e\r\n      \u003cimg align=\"center\" style=\"padding=0;\" src=\"./images/rightjoin.png\" /\u003e\r\n    \u003c/td\u003e\r\n  \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|019        | [RIGHT JOIN](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/019%20RIGHT%20LEFT)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n## UNION\r\n\r\n\u003ctable align=\"center\"\u003e\r\n  \u003ctr\u003e\r\n    \u003ctd align=\"center\" style=\"padding=0;width=50%;\"\u003e\r\n      \u003cimg align=\"center\" style=\"padding=0;\" src=\"./images/rightjoin.png\" /\u003e\r\n    \u003c/td\u003e\r\n  \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|020        | [UNION](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/020%20UNION)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Table-of-Contents) |\r\n\r\n## Funciones \r\n\r\n## Formato Hora Fecha\r\n\r\n```SQL\r\nSELECT EXTRACT (DAY FROM \"FECHA\") AS \"DIAA\"\r\nFROM esquema.\"PEDIDOS\" -- EXTRAE EL DIA\r\n```\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|021         | [Formato Hora Fecha](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/021%20Formato%20Hora%20Fecha)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Funciones) |\r\n\r\n\r\n## Funciones Matematicas\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|022         | [Funciones Matematicas](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/022%20Funcion%20matematicas)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Funciones) |\r\n\r\n\r\n\r\n## Funciones Caracteres\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|023         | [Funciones Caracteres](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/023%20Funciones%20Caracteres)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Funciones) |\r\n\r\n##  Subconsulta Valor numerico\r\n\r\n\u003ctable align=\"center\"\u003e\r\n  \u003ctr\u003e\r\n    \u003ctd align=\"center\" style=\"padding=0;width=50%;\"\u003e\r\n      \u003cimg align=\"center\" style=\"padding=0;\" src=\"./images/AVG.png\" /\u003e\r\n    \u003c/td\u003e\r\n  \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|024         | [Subconsulta Valor numerico](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/024%20Subconsulta%20Valor%20numerico)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Funciones) |\r\n\r\n\r\n## Subconsulta por lista de Valores\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|025         | [Subconsulta por lista de Valores](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/025%20Sunconsulta%20por%20lista%20de%20Valores)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Funciones) |\r\n\r\n\r\n## Subconsulta con EXITS\r\n\r\n\r\n```SQL\r\n-- Subconsulta con EXITS\r\n\r\nSELECT \"NOMBRE\", \"APELLIDO1\", \"DEP\"\r\nfrom esquema.\"PERSONAS\" as p\r\nwhere EXISTS\r\n(SELECT * FROM esquema.\"DEPARTAMENTOS\" as D\r\nWHERE D.\"DEP\" = P.\"DEP\")\r\n```\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|026         | [Subconsulta con EXITS](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/026%20Subconsulta%20con%20EXITS)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Funciones) |\r\n\r\n\r\n## Bases de Datos\r\n\r\n**PostgreSQL CHECK constraint for new tables**\r\n\r\n```sql\r\nDROP TABLE IF EXISTS employees;\r\nCREATE TABLE employees (\r\n\tid SERIAL PRIMARY KEY,\r\n\tfirst_name VARCHAR (50),\r\n\tlast_name VARCHAR (50),\r\n\tbirth_date DATE CHECK (birth_date \u003e '1900-01-01'),\r\n\tjoined_date DATE CHECK (joined_date \u003e birth_date),\r\n\tsalary numeric CHECK(salary \u003e 0)\r\n);\r\n```\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|027         | [Base de Datos](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/027%20Base%20de%20datos)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Funciones) |\r\n\r\n\r\n\r\n## Crear Tabla SQL\r\n\r\n\u003ctable align=\"center\"\u003e\r\n  \u003ctr\u003e\r\n    \u003ctd align=\"center\" style=\"padding=0;width=50%;\"\u003e\r\n      \u003cimg align=\"center\" style=\"padding=0;\" src=\"./images/table.png\" /\u003e\r\n    \u003c/td\u003e\r\n  \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n\r\n\r\n_Tabla Usuarios_\r\n\r\n```sql\r\nCreate table usuarios(\r\n\tid_usuario SERIAL PRIMARY KEY,\r\n\tnombre VARCHAR(45) not NULL,\r\n\tapellido1 VARCHAR(45) not NULL,\r\n\tapellido2 VARCHAR(45) not NULL,\r\n\tcontraseña VARCHAR(45) not NULL,\r\n\tEmail VARCHAR(45) unique NOT NULL,\r\n\tFecha_cracion TIMESTAMP  unique NOT NULL\r\n)\r\n```\r\n_Tabla Ocupaciones_\r\n\r\n```sql\r\nCREATE TABLE ocupaciones(\r\n\tid_ocupaciones serial PRIMARY KEY,\r\n\ttipo_ocupacion VARCHAR(45) not NULL, \r\n\tDescrpcion VARCHAR(100) not NULL\r\n)\r\n```\r\n\r\n_Tabla Usuario -ocupaciones (FOREING KEY)_\r\n\r\n```sql\r\nCREATE Table usuario_ocupaciones(\r\n\tid_usuario INTEGER REFERENCES usuarios(id_usuario), -- hace referencia\r\n\tid_ocupacion INTEGER REFERENCES ocupaciones(id_ocupacion)\r\n) \r\n```\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|028         | [Crear Tabla SQL](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/028%20Crear%20Tabla%20SQL)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Funciones) |\r\n\r\n## Insert SQL\r\n\r\n_Insertar a la Tabla Usuarios_\r\n\r\n```sql\r\nINSERT INTO usuarios(nombre, apellido1, apellido2, contraseña, email, fecha_creacion)\r\nvalues('Brian', 'marquez', 'inca roca', '123', 'brian@mail.com', CURRENT_TIMESTAMP)\r\n\r\n_Insertar a la Tabla Usuarios_\r\n\r\nINSERT INTO usuarios(nombre, apellido1, apellido2, contraseña, email, fecha_creacion)\r\nvalues('Maria', 'Isabel', 'Isabel', '456', 'maria@mail.com', CURRENT_TIMESTAMP)\r\n```\r\n\r\n_Insertar a la Tabla Ocupaciones_\r\n```sql\r\nInsert Into ocupaciones(tipo_ocupacion, descripcion)\r\nvalues ('DBA', 'Reliaza Mantenimiento a la base de datos')\r\n```\r\n\r\n```sql\r\nInsert into usuario_ocupaciones(id_usuario, id_ocupacion)\r\nvalues (1,1)\r\n```\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|029         | [Insert SQL](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/029%20Insertar%20SQL)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Funciones) |\r\n\r\n## UPDATE\r\n\r\n```sql\r\nselect * from usuarios\r\nupdate usuarios set email='brianenrique@mail.com'\r\nwhere id_usuario = 1\r\n```\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|30         | [Insert SQL](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/030%20Actualizar%20UPDATE)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Funciones) |\r\n\r\n## DELETE\r\n\r\n```sql\r\nInsert Into ocupaciones(tipo_ocupacion, descripcion)\r\nvalues ('programador', 'Reliaza Mantenimiento de lo sistemas')\r\n\r\nInsert Into ocupaciones(tipo_ocupacion, descripcion)\r\nvalues ('programador 2', 'Reliaza Mantenimiento a la base de datos 2')\r\n\r\n/* delete */\r\ndelete from ocupaciones\r\nwhere id_ocupacion = 3\r\n```\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|31         | [DELETE](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/031%20Borrar%20DELETE)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Funciones) |\r\n\r\n## ALTER\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|32         | [ALTER](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/032%20ALTER)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Funciones) |\r\n\r\n## CASE\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|33        | [CASE](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/033%20CASE)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Funciones) |\r\n\r\n## COALESCE\r\n\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|34        | [COALESCE](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/034%20COALESCE)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Funciones) |\r\n\r\n\r\n## CAST\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|35        | [CAST](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/034%20COALESCE)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Funciones) |\r\n\r\n\r\n## Importar Ficheros\r\n\r\n\u003ctable align=\"center\"\u003e\r\n  \u003ctr\u003e\r\n    \u003ctd align=\"center\" style=\"padding=0;width=50%;\"\u003e\r\n      \u003cimg align=\"center\" style=\"padding=0;\" src=\"./images/import.png\" /\u003e\r\n    \u003c/td\u003e\r\n  \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n\u003ctable align=\"center\"\u003e\r\n  \u003ctr\u003e\r\n    \u003ctd align=\"center\" style=\"padding=0;width=50%;\"\u003e\r\n      \u003cimg align=\"center\" style=\"padding=0;\" src=\"./images/import2.png\" /\u003e\r\n    \u003c/td\u003e\r\n  \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|36        | [Importar Ficheros](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/036%20Importar%20Ficheros)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Funciones) |\r\n\r\n## Exportar Ficheros\r\n\r\n\u003ctable align=\"center\"\u003e\r\n  \u003ctr\u003e\r\n    \u003ctd align=\"center\" style=\"padding=0;width=50%;\"\u003e\r\n      \u003cimg align=\"center\" style=\"padding=0;\" src=\"./images/exportar.png\" /\u003e\r\n    \u003c/td\u003e\r\n  \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n\r\n\r\n|Numeration  | File   |  Link       |    Folk     |  Code       | Version     | State       | Download    |  Go back    |\r\n|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|\r\n|37        | [Exportar Ficheros](https://github.com/brian-emarquez/PostgreSQL-Training/tree/main/037%20Export%20Ficheros)  | ✔️  | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Funciones) |\r\n\r\n\r\n---\r\n\r\n## Ubuntu\r\n\r\n\u003ctable align=\"center\"\u003e\r\n  \u003ctr\u003e\r\n    \u003ctd align=\"center\" style=\"padding=0;width=50%;\"\u003e\r\n      \u003cimg align=\"center\" style=\"padding=0;\" src=\"./images/ubuntu.jpg\" /\u003e\r\n    \u003c/td\u003e\r\n  \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n- Install Terminal\r\n\r\nInstall Terminal 1 - [Digitalocean](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-20-04-es)\r\n\r\nInstall Terminal 2 - [PostgreSQL](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-20-04-es)\r\n\r\n\r\n* Comandos\r\n\r\n_Crear Usuario_\r\n\r\nPara crear un usuario de PostgreSQL, utilice la siguiente instrucción SQL:\r\n\r\n```sql\r\nCREATE USER myuser WITH PASSWORD 'secret_passwd';\r\n```\r\n\r\nTambién puede crear un usuario con la siguiente instrucción SQL:\r\n\r\n```sql\r\nCREATE ROLE myuser WITH LOGIN PASSWORD 'secret_passwd';\r\n```\r\n\r\n## Books\r\n\r\n\u003ctable\u003e\r\n  \u003ctr\u003e\r\n      \u003ctd\u003eServer\u003c/td\u003e\r\n      \u003ctd\u003eName\u003c/td\u003e\r\n      \u003ctd\u003eAuthors\u003c/td\u003e\r\n      \u003ctd\u003eEditorial\u003c/td\u003e\r\n      \u003ctd\u003eISBN\u003c/td\u003e\r\n      \u003ctd\u003eLink\u003c/td\u003e\r\n  \u003c/tr\u003e\r\n\r\n   \u003ctr\u003e\r\n      \u003ctd\u003eOneDrive\u003c/td\u003e\r\n      \u003ctd\u003eMastering PostgreSQL 13\u003c/td\u003e\r\n      \u003ctd\u003ePaul Deitel, Harvey Deitel\u003c/td\u003e\r\n      \u003ctd\u003ePackt\u003c/td\u003e\r\n      \u003ctd\u003eN 978-1-80056-749-8\u003c/td\u003e\r\n      \u003ctd\u003e\u003ca href=\"https://ucsmedu-my.sharepoint.com/:b:/g/personal/47092136_ucsm_edu_pe/EcpSbHNINblIpq1LeicnzJcBigUclTaGFQAmzhbyiwgXQg?e=FadSor\"\u003eMastering PostgreSQL 13\u003c/a\u003e\u003c/td\u003e\r\n  \u003c/tr\u003e\r\n\r\n\u003c/table\u003e\r\n\r\n---\r\n\r\n## Paypal Donation\r\n🩸 Hacer una donación [PAYPAL](https://www.paypal.com/donate?hosted_button_id=98U3T62494H9Y) 🍵\r\n\r\n---\r\n\r\n \u003ctable align=\"center\"\u003e\r\n    \u003ctr\u003e\r\n      \u003ctd colspan=\"3\"\u003eA\u003c/td\u003e\r\n        \u003ctd\u003eB\u003c/td\u003e\r\n      \u003c/tr\u003e\r\n      \u003ctr\u003e\r\n        \u003ctd\u003eC\u003c/td\u003e\r\n      \u003ctd colspan=\"2\"\u003e\u003cimg align=\"center\" style=\"padding=0;\" src=\"./images/fractal.gif\" /\u003e\u003c/td\u003e\r\n        \u003ctd\u003eE\u003c/td\u003e\r\n      \u003c/tr\u003e\r\n      \u003ctr\u003e\r\n      \u003ctd colspan=\"3\"\u003eF\u003c/td\u003e\r\n        \u003ctd\u003eG\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n\u003c/table\u003e\r\n","funding_links":["https://www.paypal.com/donate?hosted_button_id=98U3T62494H9Y"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrian-emarquez%2Fpostgresql-training","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrian-emarquez%2Fpostgresql-training","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrian-emarquez%2Fpostgresql-training/lists"}