I have a user table that I can easily export with postgres by doing
\copy users to 'tmp/users2015.csv' csv header
My users has_many questions, and I'm wondering if there's a way I can export just the users who have asked a question. The problem is here's no column in my users table that represents the number of questions a user has asked, so I don't think I can do this. Is there any possible way or a different approach? I really care about just knowing how many users have asked questions, so I could also export my questions table, and possibly filter out questions that have been asked by the same user?