title: unique and repeat column
body: <p>Display only unique and repeat column</p>
  <p><strong>sqlfiddle</strong>: <a href="http://sqlfiddle.com/#!9/97bac/1" rel="nofollow noreferrer">http://sqlfiddle.com/#!9/97bac/1</a></p>
  <pre><code>SELECT *
  FROM `tbl_views_clicks`
  WHERE `iDealID` =389
  </code></pre>
  <p><strong>result will be:</strong></p>
  <pre><code>|  iID | iUserID | iDealID | iCategoryID | iSubCategoryID |    vType | eGainType | iLocationID |              dtAdded | eDeviceType |
  |------|---------|---------|-------------|----------------|----------|-----------|-------------|----------------------|-------------|
  | 3410 |       1 |     389 |          79 |            135 | location |   Instant |        1403 | 2017-08-21T11:26:51Z |     Android |
  | 3411 |       1 |     389 |          79 |            135 | location |   ByClick |           0 | 2017-08-21T11:26:52Z |     Android |
  | 3412 |       1 |     389 |          79 |            135 |    gotit |   ByClick |           0 | 2017-08-21T11:27:19Z |     Android |
  | 3413 |       1 |     389 |          79 |            135 |    gotit |   ByClick |           0 | 2017-08-21T11:27:28Z |     Android |
  | 3414 |       1 |     389 |          79 |            135 |     back |   ByClick |           0 | 2017-08-21T11:27:32Z |     Android |
  | 3475 |     250 |     389 |          79 |            135 | location |   Instant |        1403 | 2017-08-21T12:55:34Z |     Android |
  | 3476 |     250 |     389 |          79 |            135 | location |   ByClick |           0 | 2017-08-21T12:55:36Z |     Android |
  | 3477 |     250 |     389 |          79 |            135 |    gotit |   ByClick |           0 | 2017-08-21T12:56:39Z |     Android |
  | 3479 |     250 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:04:30Z |     Android |
  | 3480 |     250 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:04:54Z |     Android |
  | 3481 |     250 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:05:06Z |     Android |
  | 3482 |     250 |     389 |          79 |            135 |    gotit |   ByClick |           0 | 2017-08-21T13:05:16Z |     Android |
  | 3483 |     250 |     389 |          79 |            135 |     back |   ByClick |           0 | 2017-08-21T13:05:21Z |     Android |
  | 3484 |       1 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:06:28Z |     Android |
  | 3485 |       1 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:06:36Z |     Android |
  | 3486 |       1 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:06:44Z |     Android |
  </code></pre>
  <p>But I want like below:</p>
  <ul>
  <li>if vType is gotit or back first time then CustomType = 'Unique' else CustomType = 'Repeat'</li>
  <li>if vType is website first time then CustomType = 'Unique' else CustomType = 'Repeat'</li>
  </ul>
  <p><strong>Unique &amp; Repeat Result:</strong></p>
  <pre><code>|  iID | iUserID | iDealID | iCategoryID | iSubCategoryID |    vType | eGainType | iLocationID |              dtAdded | eDeviceType | CustomType
  |------|---------|---------|-------------|----------------|----------|-----------|-------------|----------------------|-------------|-------------
  | 3410 |       1 |     389 |          79 |            135 | location |   Instant |        1403 | 2017-08-21T11:26:51Z |     Android | Unique
  | 3411 |       1 |     389 |          79 |            135 | location |   ByClick |           0 | 2017-08-21T11:26:52Z |     Android | Delete
  | 3412 |       1 |     389 |          79 |            135 |    gotit |   ByClick |           0 | 2017-08-21T11:27:19Z |     Android | Unique
  | 3413 |       1 |     389 |          79 |            135 |    gotit |   ByClick |           0 | 2017-08-21T11:27:28Z |     Android | Repeat
  | 3414 |       1 |     389 |          79 |            135 |     back |   ByClick |           0 | 2017-08-21T11:27:32Z |     Android | Repeat
  | 3475 |     250 |     389 |          79 |            135 | location |   Instant |        1403 | 2017-08-21T12:55:34Z |     Android | Unique
  | 3476 |     250 |     389 |          79 |            135 | location |   ByClick |           0 | 2017-08-21T12:55:36Z |     Android | Delete
  | 3477 |     250 |     389 |          79 |            135 |    gotit |   ByClick |           0 | 2017-08-21T12:56:39Z |     Android | Unique
  | 3479 |     250 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:04:30Z |     Android | Unique
  | 3480 |     250 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:04:54Z |     Android | Repeat
  | 3481 |     250 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:05:06Z |     Android | Repeat
  | 3482 |     250 |     389 |          79 |            135 |    gotit |   ByClick |           0 | 2017-08-21T13:05:16Z |     Android | Repeat
  | 3483 |     250 |     389 |          79 |            135 |     back |   ByClick |           0 | 2017-08-21T13:05:21Z |     Android | Repeat
  | 3484 |       1 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:06:28Z |     Android | Unique
  | 3485 |       1 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:06:36Z |     Android | Unique
  | 3486 |       1 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:06:44Z |     Android | Unique
  </code></pre>
  <p><strong>Final Result:</strong></p>
  <pre><code>|  iID | iUserID | iDealID | iCategoryID | iSubCategoryID |    vType | eGainType | iLocationID |              dtAdded | eDeviceType | CustomType
  |------|---------|---------|-------------|----------------|----------|-----------|-------------|----------------------|-------------|-------------
  | 3410 |       1 |     389 |          79 |            135 | location |   Instant |        1403 | 2017-08-21T11:26:51Z |     Android | Unique
  | 3411 |       1 |     389 |          79 |            135 | location |   ByClick |           0 | 2017-08-21T11:26:52Z |     Android | Delete // delete this
  | 3412 |       1 |     389 |          79 |            135 |    gotit |   ByClick |           0 | 2017-08-21T11:27:19Z |     Android | Unique
  | 3413 |       1 |     389 |          79 |            135 |    gotit |   ByClick |           0 | 2017-08-21T11:27:28Z |     Android | Repeat
  | 3414 |       1 |     389 |          79 |            135 |     back |   ByClick |           0 | 2017-08-21T11:27:32Z |     Android | Repeat // delete this
  | 3475 |     250 |     389 |          79 |            135 | location |   Instant |        1403 | 2017-08-21T12:55:34Z |     Android | Unique
  | 3476 |     250 |     389 |          79 |            135 | location |   ByClick |           0 | 2017-08-21T12:55:36Z |     Android | Delete // delete this
  | 3477 |     250 |     389 |          79 |            135 |    gotit |   ByClick |           0 | 2017-08-21T12:56:39Z |     Android | Unique
  | 3479 |     250 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:04:30Z |     Android | Unique
  | 3480 |     250 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:04:54Z |     Android | Repeat
  | 3481 |     250 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:05:06Z |     Android | Repeat // delete this
  | 3482 |     250 |     389 |          79 |            135 |    gotit |   ByClick |           0 | 2017-08-21T13:05:16Z |     Android | Repeat
  | 3483 |     250 |     389 |          79 |            135 |     back |   ByClick |           0 | 2017-08-21T13:05:21Z |     Android | Repeat // delete this
  | 3484 |       1 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:06:28Z |     Android | Unique
  | 3485 |       1 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:06:36Z |     Android | Repeat
  | 3486 |       1 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:06:44Z |     Android | Repeat // delete this
  </code></pre>
  <p><strong>So it will be:</strong></p>
  <pre><code>|  iID | iUserID | iDealID | iCategoryID | iSubCategoryID |    vType | eGainType | iLocationID |              dtAdded | eDeviceType | CustomType
  |------|---------|---------|-------------|----------------|----------|-----------|-------------|----------------------|-------------|-------------
  | 3410 |       1 |     389 |          79 |            135 | location |   Instant |        1403 | 2017-08-21T11:26:51Z |     Android | Unique
  | 3412 |       1 |     389 |          79 |            135 |    gotit |   ByClick |           0 | 2017-08-21T11:27:19Z |     Android | Unique
  | 3413 |       1 |     389 |          79 |            135 |    gotit |   ByClick |           0 | 2017-08-21T11:27:28Z |     Android | Repeat
  | 3475 |     250 |     389 |          79 |            135 | location |   Instant |        1403 | 2017-08-21T12:55:34Z |     Android | Unique
  | 3477 |     250 |     389 |          79 |            135 |    gotit |   ByClick |           0 | 2017-08-21T12:56:39Z |     Android | Unique
  | 3479 |     250 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:04:30Z |     Android | Unique
  | 3480 |     250 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:04:54Z |     Android | Repeat
  | 3482 |     250 |     389 |          79 |            135 |    gotit |   ByClick |           0 | 2017-08-21T13:05:16Z |     Android | Repeat
  | 3484 |       1 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:06:28Z |     Android | Unique
  | 3485 |       1 |     389 |          79 |            135 |  website |   ByClick |           0 | 2017-08-21T13:06:36Z |     Android | Repeat
  </code></pre>
  <p><strong>in short, all second entry must be defined as Repeat in CustomType column</strong></p>
  <p>How can it be done?</p>