on 2023 Sep 27 4:03 PM
Hi, I need some help with a widget I am trying to make in signavio.
I am looking to see vendors with two or more payment methods.
That is, as I show in the following case:
I would like to only see those cases that have two payment methods like the first three, while the fourth case, I would like it not to appear.
If you have any idea how to solve it, it would be of great help.
Thank you!
Request clarification before answering.
Hi Santiago, please let me know if the following code works. I've now filtered for >1 payment type.
SELECT
"Proveedor",
"Count Método de Pago",
"Metodo de pago"
FROM (
SELECT
"PO Vendor Name" as "Proveedor"
,COUNT("Payment Method Code REGUH") as "Count Método de Pago"
, case
when "Payment Method Code REGUH" = 'T'
then 'T - Transferencia Bancaria'
when "Payment Method Code REGUH" = 'Z'
then 'Z - Vale Vista (Pago)'
when "Payment Method Code REGUH" = 'C'
then 'C - Cheques (Emitidos)'
END as "Metodo de pago"
FROM THIS_PROCESS) as sub
WHERE "Count Método de Pago" > 1
ORDER BY 2 DESC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, unfortunately the solution did not work for us. The payment methods are always more than one, so it will always be greater than one the result of >.
For example for a vendor, you can have 5000 T and 200 C, so it will be > to 1.
I was thinking of maybe finding a way where we can find that if the vendor has at least 1 T and 1 C, then it recognizes that that user has more than 1 payment method. But we haven't found a way to do that yet.
User | Count |
---|---|
79 | |
29 | |
9 | |
9 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.