Skip to content

Creating tables in InfluxDB via Terminal

Are there tutorials online that teaches you how to create tables and input values in InfluxDB? How would you create a table and insert values into them? Answer InfluxDB doesn’t really have the concept of a table. Data is structured into series, which is composed of measurements, tags, and fields. Measur…

Split a CSV field into different rows in SQL

A colleague of mines encountered this problem while working on a COBOL program and eventually solved it at the application level. Still I am curious if it is possible to solve it on the data access level, with SQL. This is somehow related to this other question, but I’d like to use only ANSI SQL. I&#821…

Pandas DENSE RANK

I’m dealing with pandas dataframe and have a frame like this: I want to make an equialent to DENSE_RANK () over (order by year) function. to make an additional column like this: How can it be done in pandas? Thanks! Answer Use pd.Series.rank with method=’dense’

PHP Loop through results

I am trying to loop through my database and check to see if the user already exists in another table. If they do then I want to increment a value, if they don’t then I want to add the user. When I run the code below it happily loops through all the results: However when I add in the SQL

Executing SQL query on multiple databases

I know my post has a very similar title to other ones in this forum, but I really couldn’t find the answer I need. Here is my problem, I have a SQL Server running on my Windows Server. Inside my SQL …

‘unicode’ object has no attribute ‘utcoffset’

In my admin, I am getting errors for only one class, ‘unicode’ object has no attribute ‘utcoffset’. I have looked at a few other similar questions and have been unable to solve it. Any ideas on how to fix it? The traceback is below the class. Traceback: Answer The default value for you…