i have grouped my read_dataxx as
Fielts to retrieve
names
ROUND(AVG(Model.points),2 ):Model.point1
ROUND(AVG(Model.results),2 ):Model.results
observations
grouped by
names
here i can calculate all the column values grouped by person fine
but i want to pick most used words from observations to make easier analysis there
when i call model.observations it cames only first value however i need to look most used words of all column. Cna i make the column as a string so i can use it in php
this is my php it only counts first observations ignores the other observations with the same person
in read data above i tried something like
SRTRING_AGG(Model.observations, ','):Model.observ
it gave me Incorrect parameters in the call to stored function `string_agg`
Fielts to retrieve
names
ROUND(AVG(Model.points),2 ):Model.point1
ROUND(AVG(Model.results),2 ):Model.results
observations
grouped by
names
here i can calculate all the column values grouped by person fine
but i want to pick most used words from observations to make easier analysis there
when i call model.observations it cames only first value however i need to look most used words of all column. Cna i make the column as a string so i can use it in php
this is my php it only counts first observations ignores the other observations with the same person
in read data above i tried something like
SRTRING_AGG(Model.observations, ','):Model.observ
it gave me Incorrect parameters in the call to stored function `string_agg`
$text = $this->get("new_students_table.row.Model.observations"); //this is the string
$words = str_word_count($text, 1); // here counting each string
$stopwords = array("a", "you", "A"); //excluded numbers
$frequency = array_count_values(array_diff($words, $stopwords)); //exclude numbers and create an array
arsort($frequency); //sort array from smaller to higher
$aaa=array_slice($frequency, 0, 5); //select 3 words to show
foreach($aaa as $words=>$counts){
echo $words.'('.$counts.')'.', ';
}