This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import psutil | |
| import time | |
| import os | |
| #To execute: | |
| #DISPLAY=:0 python3 main.py | |
| def clearScreen(): | |
| # Clear screen using ANSI escape sequences | |
| if os.name == 'nt': # For Windows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --link: https://drive.google.com/file/d/1oL_6TLdZuicRCsJZDSRuzoUv9SQxajoa/view?usp=share_link | |
| CREATE TABLE states ( | |
| id serial primary key, | |
| name varchar(30) NOT NULL unique | |
| ); | |
| CREATE TABLE cities ( | |
| id serial primary key, | |
| name varchar(30)NOT NULL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --Link da imagem: https://drive.google.com/file/d/1LY0psjja8-rJLvkZxBpHaJUVbdVUVm75/view?usp=share_link | |
| CREATE TABLE students ( | |
| id serial primary key, | |
| "classId" serial REFERENCES classes(id), | |
| name varchar(30) NOT NULL, | |
| cpf varchar(30) NOT NULL unique, | |
| email varchar(30) NOT NULL unique | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --Link do print: https://drive.google.com/file/d/1rap2YssIh1eQv1bLjsAMkAy3MytPaAeJ/view?usp=sharing | |
| CREATE TABLE states ( | |
| id int primary key, | |
| name varchar(30) NOT NULL unique | |
| ); | |
| CREATE TABLE cities ( | |
| id int primary key, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE states ( | |
| id int primary key, | |
| name varchar(30) NOT NULL unique | |
| ); | |
| CREATE TABLE cities ( | |
| id int primary key, | |
| name varchar(30)NOT NULL, | |
| stateId int foreign key references states(id) NOT NULL | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT COUNT(*) FROM experiences WHERE "endDate" IS NOT NULL; | |
| SELECT "userId" AS id, COUNT("userId") AS educations FROM educations GROUP BY "userId" ORDER BY "userId"; | |
| SELECT name as writer FROM users WHERE id = 465; SELECT COUNT("writerId") AS testimonials FROM testimonials WHERE "writerId" = 465; |