New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selectを減らした #12

Merged
merged 5 commits into from Sep 18, 2018

Conversation

Projects
None yet
2 participants
@euglena1215
Copy link
Collaborator

euglena1215 commented Sep 16, 2018

No description provided.

SQL
statement = db.prepare(sql.gsub("\n"," "))
result = statement.execute(event_id).to_a

event['total'] = result.size

event['remains'] = result.select { |row| row['reserved_at'].nil? }.size

result_with_rank = result.group_by {|row| row['rank'] }

This comment has been minimized.

@chigichan24

chigichan24 Sep 16, 2018

Collaborator

あー.これ早くなりそう

This comment has been minimized.

@euglena1215

euglena1215 Sep 16, 2018

Author Collaborator

わかる

@euglena1215

This comment has been minimized.

Copy link
Collaborator Author

euglena1215 commented Sep 18, 2018

3,740 🤔

@euglena1215

This comment has been minimized.

Copy link
Collaborator Author

euglena1215 commented Sep 18, 2018

4,043 🤔

@euglena1215 euglena1215 merged commit 8d77222 into master Sep 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment