Forums
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
@traq Ah! School boy error. It’s working now.
Not sure what you mean about grouping the votes?
SELECT
user_types.user_type,
users.user_id,
users.firstname,
users.lastname,
users.location,
user_experience.experience,
users.portfolio,
Count(user_votes.vote_id)
AS CountOfvote_id,
freelancers.jobtitle,
freelancers.priceperhour
FROM users
AS voters
RIGHT JOIN
((((users LEFT JOIN user_votes
ON users.user_id = user_votes.vote_id)
LEFT JOIN freelancers
ON users.user_id = freelancers.freelancer_id)
LEFT JOIN user_experience
ON users.user_id = user_experience.experience_id)
LEFT JOIN user_types
ON users.user_id = user_types.user_type_id)
ON voters.user_id = user_votes.vote_id
WHERE user_types.user_type != "Employer"
GROUP BY
users.user_id,
users.firstname,
users.lastname,
users.location,
user_experience.experience,
users.portfolio,
user_votes.vote_id,
freelancers.jobtitle,
freelancers.priceperhour
HAVING CountOfvote_id < 10
Not sure what you mean about grouping the votes?
GROUP BY CountOfvote_id
-- . . .
Though I suppose all the other grouping you’re doing would make this unnecessary. Are you getting the correct (expected) results now?