- Project to normalize and populate a table in the third normal form, and access its informations through
SQL
queries.
Challenge 1 ✔️
- Create
SpotifyClone
database
Challenge 2 ✔️
- Create
QUERY
to exhibit 3 columns (cancoes
,artistas
andalbuns
):
cancoes
must exhibit total amount of songsartistas
must exhibit total amount of artistsalbuns
must exhibit total amount of albums
Challenge 3 ✔️
- Create
QUERY
to exhibit 3 columns (usuario
,qtde_musicas_ouvidas
andtotal_minutos
):
usuario
alias must display user nameqtde_musicas_ouvidas
must display total amount of songs listened by user based on reproduction historytotal_minutos
must display total minutes listened by user based on reproduction history
Challenge 4 ✔️
- Create
QUERY
to display active users in 2021, based on most recent date in reproduction history:
usuario
alias must display user namecondicao_usuario
must display whether user is active or not
Challenge 5 ✔️
- Create
QUERY
to check top 2 played songs in the moment:
cancao
alias must display song namereproducoes
alias must display how many users played the song
Challenge 6 ✔️
- Create
QUERY
to check company billing:
faturamento_minimo
alias must display the lowest existing plan value for a user.faturamento_maximo
alias must display the highest existing plan value for a user.faturamento_medio
alias must display the average value of plans owned by users so far.faturamento_total
alias must display the total value earned from plans owned by users.
Challenge 7 ✔️
- Create
QUERY
to relate albums to followers:
artista
alias must display artist name.album
alias must display album name.seguidores
alias must display the quantity of followers for each given artist.
Challenge 8 ✔️
- Create
QUERY
to relate albums to artists:
artista
alias must display artist name.album
alias must display album name.
Challenge 9 ✔️
- Create
QUERY
to display quantity of songs in an user reproduction history:
quantidade_musicas_no_historico
alias must display quantity of songs.
Challenge 10 ✔️
- Create
QUERY
to exhibit name and times a song was played by an user using free or personal plans:
nome
alias must display song name.reproducoes
alias must display how many users listened to given song.
Challenge 11 ✔️
- Create
QUERY
to change and sort song names:
nome_musica
alias must display original song name.novo_nome
alias must display altered song name.
In the last word of a song name:
- Change
Streets
byCode Review
- Change
Her Own
byTrybe
- Change
Inner Fire
byProject
- Change
Silly
byNice
- Change
Circus
byPull Request
With Docker
👉 Docker-compose was provided by Trybe
- Run
node
anddb
by running:
$ docker-compose up -d
- Open interactive terminal using:
$ docker exec -it one_for_all bash
- Install dependencies, inside the container, with:
$ npm install
Install it locally
- Open terminal and create a directory in your preferred location:
$ mkdir <Your directory name here>
- Access directory then clone the repository:
$ cd <Your directory name here>
$ git clone [email protected]:ViniGB/Project-One-for-all.git
- Access the newly created directory:
$ cd Project-One-for-all
- Install dependencies:
$ npm install