Select column from current table to a related table I have this schema:
CREATE TABLE `players` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `email` varchar(255) NOT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `email` (`email`)
);

CREATE TABLE `teams` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT ,
    `player_id` int(10) unsigned NOT NULL,
    `message` text NOT NULL,
    `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`)
);

I need to query teams table, where player_id has email barcelonafc@outlook.com, and also sorting it by the last 30 days of creation in the database.
Right now I have this query:
SELECT * 
FROM teams 
WHERE created_at BETWEEN DATE_SUB(CURDATE(), INTERVAL 30 DAY) AND NOW();

This query is fine for selecting from teams and for filtering by the last 30 days of creation.
But, I can't figure out how to actually access players from it, and then filter by email='barcelonafc@outlook.com' as well.
I know it might be a dumb question, but, any ideas?
Should I change the schema for this?
It is a MySQL database.
Let’s join on player_id
SELECT * 
  FROM teams t INNER JOIN players p ON t.player_id = p.id
 WHERE t.created_at &gt;= DATE_SUB(CURDATE(), INTERVAL 30 DAY)
   and p.email = 'barcelonafc@outlook.com'

Be sure to verify if the results should be filtered on players added within the last 30 days or teams.