Re: [SQL] Conditional Lookup Table with Like - Mailing list pgsql-sql

From sqlQuestions
Subject Re: [SQL] Conditional Lookup Table with Like
Date
Msg-id 1487291824702-5944807.post@n3.nabble.com
Whole thread Raw
In response to Re: [SQL] Conditional Lookup Table with Like  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-sql
OK, it's very close I think. I created a Fiddle that more closely represents
what I need with an added table.

http://sqlfiddle.com/#!15/5d76f/6

It's showing a few too many records and GROUP BY doesn't seem to help.
Instead of 10, it should show these 6.

product_code    date_signed    description    category
1    February, 01 2017 00:00:00    i have a green truck    vehicle
1    February, 01 2017 00:00:00    i have a RED car    color
2    February, 01 2017 00:00:00    i have a blue boat    vehicle
2    February, 01 2017 00:00:00    i have a blue rug    vehicle
3    February, 01 2017 00:00:00    i have a dark cat    (null)
3    February, 01 2017 00:00:00    i have a dark dog    (null)




--
View this message in context: http://postgresql.nabble.com/Conditional-Lookup-Table-with-Like-tp5944796p5944807.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.



pgsql-sql by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [SQL] Conditional Lookup Table with Like
Next
From: sqlQuestions
Date:
Subject: Re: [SQL] Conditional Lookup Table with Like