How can I use a where statement with grouped results? I am grouping entries that have the same date together so that I only get a single date. Works great.

I would like to loop through each entry that has that date and I'm not having much luck. I want to show 

Here is what I have so far:

{% for date, attempt in attempts|group('attemptDate') %}
    &lt;tr&gt;
        &lt;td&gt;{{ date|date('M j, Y') }}&lt;/td&gt;
        {% if type == 'My Type' %}
            {# Get all entries where type = My Type &amp; entry.attemptDate = date. #}
            {% set total = 0 %}
            {% count = 0 %}
            {% for ?? in ?? %} {# 
                {% total = loop.index %}
                {% count = {# if value in myField is true #} %}
                &lt;td&gt;{{ count }}/{{ total }}&lt;/td&gt;
            {% endfor %}
        {% endif %}
    &lt;/tr&gt;
{% endfor %}


Thank you for any suggestions!
This should work:

{% for date, attempt in attempts|group('attemptDate') %}
    &lt;tr&gt;
      &lt;td&gt;{{ date|date('M j, Y') }}&lt;/td&gt;
      {% for entry in attempt %}
        {% if entry.type == 'My Type' %}
          &lt;td&gt;{{ entry.title }}&lt;/td&gt;
        {% endif %}
      {% endfor %}
    &lt;/tr&gt;
  {% endfor %}


I don't know what you want to do with the 'type' of the entries?
But if you want to limit the amount of entries according to type, you could fill "attempts" with all entries of a certain type first and then loop through them. Than you could remove the if statement which would be cleaner and faster I think.

So something like: 

{% set attempts = craft.entries.section("something").type("My Type").find() %}