---
# System prepended metadata

title: // Semana de Desafio Módulo 1
tags: [backend, fullstackprogram]

---

# // Semana de Desafio Módulo 1 

###### tags: `backend`  `fullstackprogram`
_______

## // Grupo 1


**Questão 1**:

```sql
select house,
COUNT (*) as count 
from harry_potter
where blood_status ='Muggle-born' or blood_status = 'Half-blood'
group by house
order by COUNT desc
limit 4;
```

**Questão 2**:

```sql
select house, 
COUNT (*) as count
from harry_potter 
where blood_status = 'Pure-blood'
and house is not null
group by house
order by COUNT (*) asc
limit 1;

```

**Questão 3**:

```sql
select COUNT (name)
from harry_potter
where name like '%Weasley%'
order by COUNT;

```

**Questão 4**:
```sql
select COUNT (name)
from harry_potter
where name like '%Weasley%'
and name <> 'Red'
order by COUNT;
```

**Questão 5**:
```sql
select Patronus, count(*)
from harry_potter
where Patronus not in ('Unknown', 'Non-corporeal', 'None')
group by Patronus
order by COUNT desc 
limit 3;

```

**Questão 6**:
```sql


```

**Questão 7**:
```sql
select name
from harry_potter 
where loyalty like '%Lord Voldemort%'
and house <> 'Slytherin';

```

## // Grupo 2

**Questão 1**:
```sql


```

**Questão 2**:
```sql


```

**Questão 3**:
```sql


```

**Questão 4**:
```sql
select * from harry_potter;

select name
from harry_potter 
where
name not in(
select "name" 
from harry_potter
where loyalty like '%Lord Voldermort%'
and house <> 'Slytherin')
and birth like '%September%'
and death is null
and loyalty is null 
and (patronus <> 'Non-corporeal')

```

## // Grupo 3

**Questão 1A**:
```sql


```

**Questão 1B**:
```sql


```

**Questão 1C**:
```sql


```

**Questão 1D**:
```sql


```

**Questão 1E**:
```sql


```

**Questão 1F**:
```sql


```

**Questão 1G**:
```sql


```

**Questão 2.A**:
```sql


```

**Questão 2.B**:
```sql


```
**Questão 2.C**:
```sql


```
**Questão 2.D**:
```sql


```

**Questão 3**:
```sql


```

**Questão 4.A**:
```sql


```

**Questão 4.B**:
```sql


```
**Questão 4.C**:
```sql


```
**Questão 4.D**:
```sql


```