Skip to content
Advertisement

Tag: select

avg value from a sql table

I have a MySQL table called track_e_exercises where is stored attempts in a test, every row is a new attempt. I want to know how to obtain the avg attempts in the course per person. How can I make that? c_id is the course id column and exe_user_id is the user id column. expected result for c_id=7 => (# of

MYSQL in AWS Athena

Using AWS Athena (so querying with MySql) I’m trying to retrieve information how many times the same IP has been logged. I have columns: timestamp, IP, country. I would like to count unique occurrences of each IP. I’m trying with this query but results are wrong: Thank you for helping achieving me this counter query. EDIT: Sample data: Answer If

MYSQL select name from id [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 1 year ago. Improve this question I need to get the name from the author id in table post. I have these 2 tables: post: id

MySQL – select distinct value from two column

I have a table with the following structure: How could I make a select statement on this table, which will return some rows of this table, where in each row, a specific id appears only one, indifferent on which column it is specified? For the above result set, I would like a query that would return: To give another example,

Advertisement