mithrandie / csvq

SQL-like query language for csv
https://mithrandie.github.io/csvq
MIT License
1.5k stars 65 forks source link

stdev or stddev #33

Closed alitrack closed 4 years ago

alitrack commented 4 years ago

In most Database and Statistics, we use stddev instead of stdev

mithrandie commented 4 years ago

Yes, and in csvq, STDEV can be used.

The names of the functions depends on the system. What do you want for what reason?

alitrack commented 4 years ago

I know you can use any name, just want to say, in other popular system, stddev used.

I have no special reason, in fact, it is just a hobby to test csvq, and I did not some comparation with q, similiar app developed with python, packed with pyinstaller, SQL engine is SQLite.

I compare csvq with q, you app is about double speed compare to q, and easy to use.

If you want csvq to get more popular, had better offer a popular SQL syntax, so if new guys use csvq, they do not need learn a new SQL.

that's why recommend base on the MYSQL, PostgreSQL or at least SQLite.

another reason, If I analysis my csv sample with csvq, and then I need big csv with other database, I have go rewrite the SQL, it's not a good idea.

I hope you can understand my English.

mithrandie commented 4 years ago

OK, I understand. But for example, SQL Server, one of the most used DBMS in the world, uses the function name STDEV. It's better to use standard SQL syntax, but I think it's difficult to decide what is widely used for function names.

derekmahar commented 4 years ago

Why not just support both function names?

alitrack commented 4 years ago

OK, I understand. But for example, SQL Server, one of the most used DBMS in the world, uses the function name STDEV. It's better to use standard SQL syntax, but I think it's difficult to decide what is widely used for function names.

OK, just fine, I seldom use SQL Server now.

Why not just support both function names?

also a good idea.

mithrandie commented 4 years ago

Having multiple functions that behave the same in one system can confuse users. If it was a solution without any disadvantages, then some existing major systems would have adopted that approach.

derekmahar commented 4 years ago

Multiple function names might initially confuse some users, but documenting the aliases should reduce this confusion.

mithrandie commented 4 years ago

Assuming users read the documentation, the difference in function names will not be a problem.

There are differences in function names and other details between any system, and even the SQL syntax differ from system to system. Csvq is not a compatibility program for a specific system. I thought these differences were just trivial issues that users could easily look up and use as needed, but is it really that important?