Question: I am having 8(Eight) buttons in one line(horizontal) under one linear layout. The problem is that these buttons look like rectangle whereas I want them to look like square.

```
<Button
        android:id="@+id/button25"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="right"
        android:layout_weight="0.125" 
        android:background="#ffffffff" />

```

Can someone guide me what needs to be done so that these rectangles become squares.

Answer: 
Your query, as written, is trying to group by a constant expression. I think you can just change the last two lines to:

```
and i.OverrideDate between @sd and @ed

```

The `group by` statement is unnecessary. You are only returning one row, so all rows will be aggregated.

If you needed to include the `group by` for some reason (such as this being automatically generated code), then you can use a trick such as:

```
group by (case when OverrideDate  = OverrideDate  then @sd end),
         (case when OverrideDate = OverrideDate then @ed end)

```

But I'm guessing that is unncessary in this case.
I am not sure why you using `group by` *and* `having` clauses here at all. I think you could simplify your where clause as;

```
where lbs.Name in ('Completed by Analyst',
                   'Delivered/Imported into Neptune Online') 
      and lis.Name = 'Complete'
      and bt.Name = 'Live'
      and i.IsRelevant = 1
      and i.OverrideDate between @sd and @ed

```