14,661,076 members
Rate this:
See more:
I am using two tables following
```Temp
Billno  Item        Qty Rate amt Preferences
2       Icecream    2    10   20  Parcel
2       coffee      3     10   30  Parcel
1       Cream Salad  2     20   40  A/C
3        Cococola    5      15  60  Non A/C

Billing
Billno   Billamt
2           90
1           40
3           60```

I want get the records which is parcel
```BillNo    Billamt
2           90```
Posted

Rate this:

## Solution 1

dear,
you have to write
`select billno,item from table where preferences='Parcel'`
v2
devausha 10-Apr-12 6:33am

it is displayed like following
Billno Billamt
2 90
2 90

And i want sum of total amount for the Parcel

If there are one more Billno for Parcel
It give sum of amount how to do it
Rate this:

## Solution 3

Try this

```select billno,SUM(amt)as Billamt from temp
where preferences='Parcel'
group by billno```
Rate this:

## Solution 5

Hi
try this
```SELECT distinct Temp.Billno
,Billamt
,[item]
FROM Temp t inner join billing b on t.BillNo=b.BillNo where preferences='Parcel'```

Best Luck