Question: I want to create a procedure that prints out multiple values but I don't know how. Even if I declare the Select statement inside the procedure it gives error.

This is my table
Student(ID\_student, ID\_faculty, Name, Mark)

My excercise consist on creating a procedure that display all the names of students with mark grater than 7.5.

My code gives error on creating the procedure

```
set serveroutput on;
CREATE OR REPLACE PROCEDURE getStudent
 (
  s_name OUT DBUSER.USERNAME%TYPE
 )

IS

BEGIN

  SELECT name
  INTO s_name,
  from Student WHERE mark > 7.5;

  dbms_output.put_line(s_name)

END;
/

```

Answer: 
You could add a column for `group`

```
ggplot(data = transform(df, group = with(rle(is.na(df$x)), rep(seq_along(values), lengths))),
       aes(x, y, group = group)) +
    geom_point(color = "orange", size = 5) +
    stat_summary(fun.y = mean, geom = "line")

```

[![enter image description here](https://i.stack.imgur.com/7NPNZ.png)](https://i.stack.imgur.com/7NPNZ.png)

Here's the `data`

```
transform(df, group = with(rle(is.na(df$x)), rep(seq_along(values), lengths)))
#    x  y group
#1   1  1     1
#2   2  2     1
#3   3  3     1
#4   4  4     1
#5  NA NA     2
#6  NA NA     2
#7  NA NA     2
#8   8  8     3
#9   9  9     3
#10 10 10     3

```
`data.table::rleid` is convenient for these cases : 

```r
ggplot(df, aes(x, y, group=data.table::rleid(is.na(x)))) +
  geom_point(color = "orange", size = 5) +
  stat_summary(fun.y = mean, geom = "line")
#> Warning: Removed 3 rows containing non-finite values (stat_summary).
#> Warning: Removed 3 rows containing missing values (geom_point).

```

![](https://i.imgur.com/x6Snfxn.png)