Working tables with code

Hi, I have a database collection called LiveStreamAct, where any time someone goes to a specific URL, the collection add some data from the user

Then i want to post using a table (or repeter), the names and a count of useres that today has been on the URL…

Considerations.

  1. if someone refresh the page, then I will have two registrations by the same user, therefore I’m using distinct() to keep only uniq users.

Well my input is not what I’m expecting… the table look good, but the users names are all in the same rows, instead or increasing the rows.

  1. At this moment, one the database are only to registrations, one for user Jelpus, and the second, user Guillermo Rojas. The counter is ok.

  2. The name of the field is “nombre completo”

this is the code:

import wixData from ‘wix-data’;

$w.onReady(function() {

let today = new Date(); 

	var month = new Array(); 
	month[0] = "January"; 
	month[1] = "February"; 
	month[2] = "March"; 
	month[3] = "April"; 
	month[4] = "May"; 
	month[5] = "June"; 
	month[6] = "July"; 
	month[7] = "August"; 
	month[8] = "September"; 
	month[9] = "October"; 
	month[10] = "November"; 
	month[11] = "December"; 

var dd = today.getDate(); 
var mm = month[today.getMonth()]; 
var yyyy = today.getFullYear(); 
var fechaCorta = String(dd) + "-" + String(mm) + "-" +  String(yyyy); 

let query = wixData.query("LiveStreamingAct") 


query.eq("fecha corta",fechaCorta) 

.distinct(“nombre completo”).then((results) => {

	let nombresQuery = results.items; 
	let contador = results.length 

	$w('#table1').columns = [ 
		
			{ 
			"id": "newCol", 
			"dataPath": "nombre", 
			"label": "Nombre", 
			"width": 100, 
			"visible": true, 
			"type": "string" 
			} 
			
		]; 
	
	const MyTableData = [ 

		{"nombre": nombresQuery} 

	]; 

	$w('#table1').rows = MyTableData 
	$w('#participantes').text = "Conectados en la sesión ("+ contador + ")" 

	 
	}) 

})

Hoping receive some guidelines for you.

Thanks