Hi, I'm trying to create a query where my field isn't a database field but a custom name that i want but the query result isn't what I expected.
$this->src("mysql")
->query(
MySQL::type(
DB::table('v_report_all')
->select('"Divers"')->alias('Assocation')
->sum('REC_NbPersTot')->alias('Effectif')
->count('REC_NoSocieteDetails')->alias('NbEntreprise')
->where('NoPeriode', '=', $noPeriode1)
->where('ASS_BAffilieCP', '=', 0)
)
)
->pipe($this->dataStore("association_eff_ent_no_cp_1"));
SQLSTATE[42S22]: Column not found: 1054 Unknown column '"Divers"' in 'field list'
The problem is that i don't understand how to remove the ` character in the query. Is there a way to do that ?