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
2024-07-30 20:26:31 +03:00

9 lines
151 B
SQL

SELECT
user_id, username, email
FROM
users
ORDER BY
GREATEST (
similarity (email, $1),
similarity (username, $1)
) DESC