Re: Conditional Lookup Table with Like

From: sqlQuestions <ryanpgodfrey(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Conditional Lookup Table with Like
Date: 2017-02-17 00:37:04
Message-ID: 1487291824702-5944807.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message sqlQuestions 2017-02-17 15:33:37 Re: Conditional Lookup Table with Like
Previous Message David G. Johnston 2017-02-16 23:32:38 Re: Conditional Lookup Table with Like