--tabelas
create table clientes(
    id_cliente integer (10) primary key not null,
    nome varchar (100) not null,
    idade integer(2) not null,
    telefone varchar(15) not null,
    data_matricula date
);
create table instrutores(
    id_instrutor integer(10) primary key not null,
    nome varchar (100) not null,
    especialidade varchar(50) not null,
    salario decimal (10,2)
);
create table aulas(
    id_aula integer(10) primary key not null,
    nome_aula varchar (50) not null,
    horario time
);

--dados das tabelas

insert into clientes (id_cliente, nome, idade, telefone, data_matricula)
values
    (1, 'Ana Souza', 30, '11987654321', '2021-01-15'),
    (2, 'Bruno Santos', 25, '11981234567', '2018-05-10'),
    (3, 'Carlos Lima', 40, '11984567890', '2024-03-22'),
    (4, 'Daniela Ferreira', 35, '11983214567', '2022-12-05'),
    (5, 'Eduardo Silva', 28, '11982345678', '2023-07-18');

insert into instrutores (id_instrutor, nome, especialidade, salario)
values
    (1, 'Fernanda Alves', 'Musculação', 3500.00),
    (2, 'Marcos Souza', 'Yoga', 3000.00),
    (3, 'Camila Ramos', 'Pilates', 3200.00),
    (4, 'Ricardo Moreira', 'Zumba', 2800.00),
    (5, 'Patrícia Lima', 'Spinning', 3100.00);

insert into aulas (id_aula, nome_aula, horario)
values
    (1, 'Zumba', '09:00:00'),
    (2, 'Spinning', '20:00:00'),
    (3, 'Yoga', '12:00:00'),
    (4, 'Pilates', '19:00:00'),
    (5, 'Musculação', '16:00:00');

--consultas
select * from instrutores;
select * from aulas where horario >'18:00:00';
select * from clientes where data_matricula>='2023-01-01' and data_matricula <='2023-12-31';

--atualização de dados
update clientes set telefone = '88888-8888' where id_cliente=3;

--exclusão de dados
delete from instrutores where id_instrutor=5;



































Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: