'mariadb query results separated by semicolon
So, I know nothing about Databases and just need an information inside one of it tables. I need to count duplicates assets with the same name. I am not using .sql files with queries inside it. Before, I had to login in the database and run this command. I want to automate is using another script that I already built.
So, this is what I am using now:
mysql -udb_tailstate -proot db_tailstate -e "SELECT name, COUNT(*) FROM ue GROUP BY name HAVING COUNT(*) > 1;"
And the result:
+------+----------+
| name | COUNT(*) |
+------+----------+
| ue1 | 2 |
+------+----------+
Since the result show is always more than 1, I would like to run something similar to this ( in one sentence) to show only the name of the asset that is duplicated.
I bet that for you geniuses guys this is easy.
Thanks in advance
CM
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
