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

11 lines
197 B
MySQL
Raw Normal View History

2024-07-30 17:21:33 +00:00
SELECT
2024-08-04 07:03:35 +00:00
user_id, username, email,
2024-07-30 17:21:33 +00:00
GREATEST (
similarity (email, $1),
similarity (username, $1)
2024-08-04 07:03:35 +00:00
) as "similarity!"
FROM
users
ORDER BY
2024-08-09 14:02:02 +00:00
"similarity!" DESC
LIMIT 20