title: How do I use group by in DynamoDB?
body: <p>I'm using PHP with DynamoDB. I'm fetching some records by using 'scan'. I wanted to use Group By with this query just like in MySQL. Please help.</p>
  
  <pre><code> $result = $client-&gt;scan([
              'ExpressionAttributeValues' =&gt; [
                  ':v1' =&gt; [
                      'S' =&gt; '2002',
                  ]
              ],
              'FilterExpression' =&gt; 'userId = :v1',
              'TableName' =&gt; $this-&gt;table,
          ]);
          return $result;
  </code></pre>