Question: This is the code:

```
fetch(`https://api.tenor.com/v1/random?key=${tenorAPI}&q=anime+kiss&limit=1.`)
  .then(res => res.json())
  .then(json => message.channel.send() + message.say(json.results[0].url))

  const embed = new MessageEmbed()
      .setDescription(`**${user.username}** you've kissed by **${message.author.username}**! OwO`)
      .setColor("RANDOM")
      .setImage(`https://api.tenor.com/v1/random?key=${tenorAPI}&q=anime+kiss&limit=1.gif`)
   message.channel.send(embed).then(message.react(''));
    return;

```

I want to know how can I do to see the GIF

[![See](https://i.stack.imgur.com/aF86U.png)](https://i.stack.imgur.com/aF86U.png)

Other command not embedded it shows

[![enter image description here](https://i.stack.imgur.com/paQJQ.png)](https://i.stack.imgur.com/paQJQ.png)

Answer: 
> 
> I want to be able to single out the row which has a ProductID of 8 (which can be seen twice here) and then sum their quantities
> 
> 
> 

That is nice. Apparently you want the complete row, in the row you want the ProductId and the sum of the quantities. But what do you want to do with the other properties: do you want InvoiceLineId 7 or 10? InvoiceId 3 or 4? Or are you only interested in the sum?

My advice would be to make groups of InvoiceLines that have the same ProductId. For this you can use GroupBy. Use parameter resultSelector to select the properties that you want in your end result:

```
var result = DBAccessor.InvoiceLines
    .Where(invoiceLine => invoiceLine.Quantity >= quantitySelected)

    // group the remaining invoicelines into groups with the same productId
    .GroupBy(invoiceLine => invoiceLine.ProductId,

    // parameter result selector: use the common productId and all invoiceLines
    // that have this productId to make one new:
    (productId, invoiceLinesWithThisProductId) => new
    {
        ProductId = productId,
        Quantity = invoiceLinesWithThisProductId
                   .Select(invoiceLine => invoiceLine.Quantity)
                   .Sum(),

        ... // other properties, you didn't specify what you want
    });

```
After reading the description, you seem to be willing to merge duplicates rows into one from the list and sum up the quantity of the duplicate rows. You can use `GroupBy` statement to get the desired results.

Here is an example, you can further fix it accordingly to fit your needs.

```
var dynamiceReader = DBAccessor.InvoiceLines.Where(x=> x.Quantity >= quantitySelected).GroupBy(e => e.ProductID).Select(product =>
{
    var p = product.First();
    return new
    {
        InvoiceLineID = p.InvoiceLineID,
        InvoiceID = p.InvoiceID,
        ProductID = p.ProductID,
        Quantity = product.Sum(sum => sum.Quantity)
    };
});

```

Similarly, if you want to include the merged Ids as well, then you can modify it like below:

```
InvoiceLineID = string.Join(", ", product.Select(x => x.InvoiceLineID)),

```