businessdad icon

WooCommerce - Find duplicated base currency metadata

businessdad | PRO | 01/29/16 02:04:36 PM UTC | 0 ⭐ | 875 👁️ | Never ⏰ | []
MySQL |

230 B

|

None

|

0 👍

/

0 👎

-- Find all the order with duplicate meta data
select
    post_id
    ,meta_key
    ,count(meta_key) as value_count
from 
    wp_postmeta
where
    (meta_key like '%_base_currency%')
group by
    post_id,
    meta_key
having  
    value_count >= 1

Comments