I made a relation of criminal cases in a police station.

```
CREATE TABLE C_CASE
(
Case_ID int,
Case_Details varchar(255),
Case_Status varchar(255),
Section_Of_Law varchar(255)
);

INSERT INTO C_CASE
VALUES(333,'Hit and Run','Pending','304(A)');

INSERT INTO C_CASE
VALUES(444,'Robbery','Closed','392');

INSERT INTO C_CASE
VALUES(555,'Extortion','Pending','384');

INSERT INTO C_CASE
VALUES(222,'Murder','Closed','302');

```

I created a function which will return the number of Cases which are pending.
but I get an error. The function is :

```
create function NumOfCases(@statustype varchar(255)) returns varchar(255)
as
begin
return
(
    select count(Case_Status) from C_CASE where Case_Status=@statustype
)
end

```

**QUERY:**

```
   select  from dbo.NumOfCases('Pending');

```

I keep getting the error:

**Msg 156, Level 15, State 1, Line 21
Incorrect syntax near the keyword 'from'.**

Where am I going wrong?