This repository has been archived on 2024-08-23. You can view files and clone it, but cannot push or open issues or pull requests.
project/sql/search_for_user.sql

9 lines
151 B
MySQL
Raw Normal View History

2024-07-30 17:21:33 +00:00
SELECT
user_id, username, email
FROM
users
ORDER BY
GREATEST (
similarity (email, $1),
similarity (username, $1)
) DESC