Create conversion rate per product & type of customer

Hello all,

I’m trying to figure out how to build a query that would allow me to measure the conversion rate by product and by type of customer.

I have the following data that I’m trying to join/aggregate:

with the following fields: msisdn, type

with the following fields: msisdn, sku

There are two things I’m trying to do:

  1. Display product sales per type of customer

My initial idea was:
SELECT uniqueCount(msisdn) from CustomOrderedProduct,CustomMsisdnCheck where CustomMsisdnCheck.type=‘XX’ facet CustomOrderedProduct.sku
But I don’t get any data in my graphs

  1. Display conversion rate per type of customer and type of product
    For this one, I don’t even know where to start because I need to count the number of unique msisdn of CustomMsisdnCheck and divide it by the number of common msisdn in CustomOrderedProduct that would then be filtered by sku.

Do you have any idea of how I could build this?