Giter VIP home page Giter VIP logo

Comments (9)

chadwhitacre avatar chadwhitacre commented on August 16, 2024 1
(188 rows)

from gratipay.com.

chadwhitacre avatar chadwhitacre commented on August 16, 2024 1

I mean, I skimmed it for UPDATE DELETE and INSERT. :P

from gratipay.com.

mattbk avatar mattbk commented on August 16, 2024

We require a credit card to set up a gift initially, right?

from gratipay.com.

mattbk avatar mattbk commented on August 16, 2024

No! There's just a gentle reminder. We should make this a hard rule, because otherwise what's the point?

image

I'd also go so far (once this is fixed) as to email everyone who is giving but doesn't have a card set up to tell them that they aren't actually giving and need to set a card up.

from gratipay.com.

mattbk avatar mattbk commented on August 16, 2024

@whit537 can you query how many ~users are giving but don't have a credit card set up?

from gratipay.com.

mattbk avatar mattbk commented on August 16, 2024

I think it would be something like

    SELECT username
         , balance
         , (SELECT SUM(amount) FROM payment_instructions WHERE participant_id = p.id) AS giving
         , (SELECT COUNT(*) FROM payment_instructions WHERE participant_id = p.id AND amount > 0) AS ngiving_to
      FROM participants p
     WHERE (                                  -- They do not have a credit card set up
             SELECT COUNT(*)
               FROM exchange_routes r
              WHERE r.participant = p.id
              AND r.network = 'balanced-cc'
           ) = 0
       AND giving > 0
       AND NOT is_closed
  ORDER BY claimed_time

Modified from

SELECT username
.

from gratipay.com.

mattbk avatar mattbk commented on August 16, 2024

Was my query right?

from gratipay.com.

chadwhitacre avatar chadwhitacre commented on August 16, 2024

I didn't dig that deep, I just ran it. 🐭

from gratipay.com.

mattbk avatar mattbk commented on August 16, 2024

Are you feeling okay? Is now the time for me to submit PRs without tests? ;-)

from gratipay.com.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.