This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="description" content="a descrição do seu site"> | |
<title>Título do Documento</title> | |
</head> | |
<body> | |
<p>Acesse o site <a href="http://www.satc.edu.br">clique aqui</a>.</p> | |
</body> |
This file contains 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
-- 1 | |
SELECT cod_apolice | |
,(SELECT nome from cliente c where c.cod_cliente=a.cod_cliente ) AS nome_cliente | |
,data_inicio_vigencia | |
,data_fim_vigencia | |
,valor_cobertura | |
,valor_franquia | |
,placa | |
FROM apolice a | |
ORDER BY data_fim_vigencia ASC |
This file contains 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
-- 1 | |
select count(1) as sinistros, placa | |
from sinistro | |
group by placa | |
order by count(*) desc | |
go | |
-- 2 | |
select * | |
from cliente |
This file contains 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(*) as "__lucid_aggregate" from (select "service_desk_tickets"."ticket_number", "service_desk_tickets"."title", (service_desk_tickets.attend_expiration at time zone 'UTC') AT TIME ZONE 'America/Sao_Paulo' AS attend_expiration, "service_desk_tickets"."is_revised", "service_desk_tickets"."requestor_email" as "requestor_email", "service_desk_tickets"."followers", (service_desk_tickets.solve_expiration at time zone 'UTC') AT TIME ZONE 'America/Sao_Paulo' AS solve_expiration, (service_desk_tickets.solved_in_time at time zone 'UTC') AT TIME ZONE 'America/Sao_Paulo' AS solved_in_time, "service_desk_tickets"."created_by_way_of", (service_desk_tickets.created_at at time zone 'UTC') AT TIME ZONE 'America/Sao_Paulo' AS created_at, (GREATEST(entity_field_values.updated_at,service_desk_tickets.updated_at) AT TIME ZONE 'UTC') AT TIME ZONE 'America/Sao_Paulo' AS updated_at, json_build_object('stopped', service_desk_tickets.stopped, 'reason', CASE WHEN service_desk_tickets.stopped IS TRUE THEN (SELECT name FROM s |
This file contains 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 pessoa ( | |
pessoa_id INT NOT NULL IDENTITY, | |
pessoa_nome VARCHAR(150) NOT NULL, | |
pessoa_email VARCHAR(200) NOT NULL UNIQUE, | |
pessoa_celular VARCHAR(30) NOT NULL UNIQUE, | |
pessoa_dt_cadastro DATETIME NULL DEFAULT CURRENT_TIMESTAMP, | |
pessoa_status CHAR(1) NULL DEFAULT 'O', | |
CONSTRAINT pk_pessoa_id PRIMARY KEY(pessoa_id), | |
CONSTRAINT chk_pessoa_status CHECK(pessoa_status IN ('O', 'F', 'A')) | |
) |
This file contains 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 sys | |
import os | |
class Dijkstra: | |
def __init__(self, grafo): | |
self.grafo = grafo | |
self.distancias = {} | |
self.visitado = {} | |
self.anterior = {} | |
self.infinito = sys.maxsize |
This file contains 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
-- 1 | |
-- b) Comando 2 | |
-- ALTER TABLE apolice ALTER COLUMN valor_cobertura numeric(10,2) NULL | |
-- 2 | |
-- a), d) | |
-- Falta uma vírgula depois do 'JEEP' | |
-- 3 | |
-- b) |
This file contains 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
--- MICRODADOS_ENEM_2021_SC --- | |
-- 1. Qual é a média da nota em matemática dos alunos que estudaram numa escola em Santa Catarina? | |
SELECT AVG(NU_NOTA_MT) FROM MICRODADOS_ENEM_2021_SC WHERE SG_UF_ESC='SC' | |
go | |
-- 2. Qual é a média da nota em Linguagens e Códigos dos alunos que estudaram numa escola em Santa Catarina? | |
SELECT AVG(NU_NOTA_LC) FROM MICRODADOS_ENEM_2021_SC WHERE SG_UF_ESC='SC' | |
go |
This file contains 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 aluno ( | |
cd_aluno int identity not null, | |
nm_aluno varchar(100) not null, | |
email varchar(100) not null, | |
constraint pk_aluno primary key(cd_aluno) | |
) | |
go | |
create table avaliacao ( | |
cd_avaliacao int identity not null, |
This file contains 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
class VetorNaoOrdenado: | |
def __init__(self, capacidade): | |
self.__capacidade = capacidade | |
self.__ultimaPosicao = -1 | |
self.__valores = [0]*self.__capacidade | |
def imprimir(self): | |
if self.__ultimaPosicao == -1: | |
return print("Vetor vazio") | |