Title: Group by
Last modified: August 24, 2016

---

# Group by

 *  [Jens](https://wordpress.org/support/users/jens_wp/)
 * (@jens_wp)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/group-by/)
 * I love this plugin. Thanks.
    Simple question I hope: How do I group two rows 
   in my database that looks like this:
 * Name Value1 Value2 (Headers)
    User1 100 User1               200
 * I would like the shortcode to output this:
 * Name Value1 Value2 Difference (Headers)
    user1 100       200       100
 * Is this possible with this wonderfull plugin?
    If so, could you please list the
   shortcode?
 * Regards Jens
 * [https://wordpress.org/plugins/contact-form-7-to-database-extension/](https://wordpress.org/plugins/contact-form-7-to-database-extension/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/group-by/#post-6012788)
 * You would do this with a transform. There is a “[group by](http://cfdbplugin.com/?page_id=1167)“-
   like transform. I don’t think that quite does what you want. Alternatively you
   would need to [write a transform class](http://cfdbplugin.com/?page_id=1095).
 *  Thread Starter [Jens](https://wordpress.org/support/users/jens_wp/)
 * (@jens_wp)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/group-by/#post-6012818)
 * OK.
    But I am not advanced enough to write a transform class. I will try if I
   can use the “group by”-like example.
 * /Jens

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Group by’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/contact-form-7-to-database-extension_ffffff.
   svg)
 * [Contact Form DB](https://wordpress.org/plugins/contact-form-7-to-database-extension/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-to-database-extension/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/reviews/)

## Tags

 * [group by](https://wordpress.org/support/topic-tag/group-by/)

 * 2 replies
 * 2 participants
 * Last reply from: [Jens](https://wordpress.org/support/users/jens_wp/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/group-by/#post-6012818)
 * Status: not resolved