Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Gopala Krishna A
.
Toggle Highlighting
SQL
import sqlite3 # Connect to the database connection = sqlite3.connect('path_to_your_database_file.db') # Replace 'path_to_your_database_file.db' with the actual path to your database file cursor = connection.cursor() # SQL query sql_query = ''' SELECT substr(rev_timestamp, 1, 4) AS yeard, COUNT(substr(rev_timestamp, 1, 4)) FROM change_tag, change_tag_def, revision, page, actor WHERE ct_tag_id = ctd_id AND rev_id = ct_rev_id AND page_id = rev_page AND page_namespace = 0 AND page_is_redirect = 0 AND actor_id = rev_actor AND ctd_name = "contenttranslation" AND rev_parent_id = 0 GROUP BY substr(rev_timestamp, 1, 4) ORDER BY substr(rev_timestamp, 1, 4) ''' # Execute the query cursor.execute(sql_query) # Fetch and print the results results = cursor.fetchall() for row in results: print(f"Year: {row[0]}, Count: {row[1]}") # Close the database connection connection.close()
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...