agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: sqlQuestions <ryanpgodfrey@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Conditional Lookup Table with Like
Date: Thu, 16 Feb 2017 17:37:04 -0700 (MST)
Message-ID: <1487291824702-5944807.post@n3.nabble.com> (raw)
In-Reply-To: <CAKFQuwbdNiN=-ij7Lz0gc6XRwe2cPoVKyc+WH-Z_9+7FR=yj5g@mail.gmail.com>
References: <1487283597419-5944796.post@n3.nabble.com>
	<CAKFQuwYpF146ygOUSXSsAxdAKGsSUXt=a5HtRpUQT=YTy+mwkw@mail.gmail.com>
	<1487286348488-5944801.post@n3.nabble.com>
	<CAKFQuwbdNiN=-ij7Lz0gc6XRwe2cPoVKyc+WH-Z_9+7FR=yj5g@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (9+ messages)  latest in thread

Message-ID: <1487291824702-5944807.post@n3.nabble.com>
Permalink:  ../1487291824702-5944807.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1487291824702-5944807.post@n3.nabble.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ryanpgodfrey@gmail.com
  Subject: Re: Conditional Lookup Table with Like
  In-Reply-To: <1487291824702-5944807.post@n3.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox