<< Back to Database Engineering Portfolio

Assignment 1

    write a SQL query that lists the names of songs that are by Post Malone.

  1. SELECT s.name AS 'Song Name' FROM songs AS s JOIN artists AS a ON s.artist_id = a.id WHERE a.name='Post Malone';
  2. write a SQL query that returns the average energy of songs that are by Drake.

  3. SELECT AVG(s.energy) AS &apos;Average energy of songs that are made by Drake' FROM songs AS s JOIN artists AS a ON s.artist_id = a.id WHERE a.name = 'Drake';