sort by percent matched

From: "Thomas T(dot) Thai" <tom(at)minnesota(dot)com>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: sort by percent matched
Date: 2001-09-29 03:47:26
Message-ID: Pine.NEB.4.21.0109282240580.4176-100000@ns01.minnesota.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


say i have two tables. table 1 is cars with features. table 2 is pretty
much the same as table 1, but it's for features people are looking for in
used cars.

table1: used cars
exterior_color
interior_color
transmission
am_fm
power_window
...

table2: used cars features people are looking for
exterior_color
interior_color
transmission
am_fm
power_window
...

instead of doing a query to match table2 to table1 exactly, i would like
to match it based on and sorted by percent matched. so if a person was
looking for a blue, am/fm, power window car, but there isn't one exactly
like that. instead there is one that's RED, am/fm, power window. it would
turn up as a result, but it wouldn't be 100%, but say 90%.

how do i set that up so that the results can be returned by percent
matched?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pat M 2001-09-29 05:14:44 VB 6 pro to postgres suggestion needed
Previous Message Tatsuo Ishii 2001-09-29 00:21:45 Re: Problem with the accents