I've been trying to create an inner join between two table inside a db and display the joined table inside postman (I'm working on some js backend stuff). I know how to create the inner join using the SQL Shell but when I try to implement it, I get an empty answer from the server.
queries.js file:
const getOwnedCars = "SELECT * FROM users JOIN cars ON users.car_id = cars.id";
module.exports = {
getOwnedCars,
};
routes.js file:
const {Router} = require('express');
const controller = require('./controllers');
const router = Router();
router.get('/ownedCar', controller.getOwnedCars);
module.exports = router;
constroller.js file:
const pool = require('../../../db');
const queries = require('./queries');
const getOwnedCars = (req,res) => {
pool.query(queries.getOwnedCars, (error, results) => {
if (error) throw error;
res.status(200).json(results.rows);
})
};
module.exports = {
getOwnedCars,
};
the result I get when I try to access to the owned car page. If you need any other informations feel free to ask :)

thank you guys