blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 133 | path stringlengths 3 276 | src_encoding stringclasses 33
values | length_bytes int64 23 9.61M | score float64 2.52 5.28 | int_score int64 3 5 | detected_licenses listlengths 0 44 | license_type stringclasses 2
values | text stringlengths 23 9.43M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
291e5dd66a59660e172d427e24f96e6997125535 | SQL | RupeshJey/CS123-Geospatial-Databases | /SQL_Files/Insertion_Variants/make_TROPOMI_insert_rotating_calipers.sql | UTF-8 | 28,820 | 3.640625 | 4 | [] | no_license | -- Rupesh Jeyaram
-- Created April 21st, 2019
-- Not allowed to stop uniqueness checks without this statement
SET GLOBAL log_bin_trust_function_creators = 1;
-- Drop all tables
DROP TABLE IF EXISTS entry_pool;
DROP TABLE IF EXISTS traverser;
DROP TABLE IF EXISTS stack;
DROP TABLE IF EXISTS stack_L;
DROP TABLE IF... | true |
f037570d9f2a7b17a399c0376191aa0b425cdd8b | SQL | whitespace123/Read | /MYSQL必知必会/数据库文件/regexp.sql | UTF-8 | 1,273 | 3.890625 | 4 | [] | no_license | #选择gjp数据库
USE gjp;
#展示gjp_zhangwu数据表中的字段的信息
SHOW COLUMNS FROM gjp_zhangwu;
#使用正则表达式来筛选zwmoney的数据,用升序显示前5条记录
SELECT * FROM gjp_zhangwu WHERE zwmoney REGEXP '.000' ORDER BY zwmoney ASC LIMIT 5;
#使用正则表达式来筛选匹配1000或者2000的值,用降序显示前5条记录
SELECT * FROM gjp_zhangwu WHERE zwmoney REGEXP '1000|2000'
ORDER BY zwmoney DESC LIMIT ... | true |
473646dbf4bc27b89ad6e175f184f345e08498e4 | SQL | techtronics/upa | /Insidencias/ACADEMIA/1641-URGENTE No genera Contratos docentes/SQLS/SQLQuery4.sql | ISO-8859-1 | 1,618 | 3.21875 | 3 | [] | no_license | select * from CONTRATOS_DOCENTES_UPA order by ANO_CONTRATO desc
select COUNT(*) from CONTRATOS_DOCENTES_UPA where ANO_CONTRATO = 2010
-- 732
select COUNT(*) from CONTRATOS_DOCENTES_UPA where ANO_CONTRATO = 2011
-- 812
select COUNT(*) from CONTRATOS_DOCENTES_UPA where ANO_CONTRATO = 2012
-- 812
select COUNT(*) from C... | true |
6d2c8351f444fe01bc46f8263929ac732d4e8d88 | SQL | Mounn/DB-Statistics | /DB-statistics.sql | UTF-8 | 5,560 | 3.125 | 3 | [
"Apache-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server versie: 5.7.14 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Versie: 9.4.0.5125
-- -------------------------------------------------------... | true |
f6ba83d534e67a0b923d7bad1aef3ff56b558d68 | SQL | fcheang/workforce-management | /upgrade1.sql | UTF-8 | 1,822 | 3.21875 | 3 | [] | no_license | update permission_type set name = 'Intake Staff Report' where name = 'Daily Contribution Report';
update permission_type set name = 'Data Staff Report' where name = 'Data Compliance Personnel Tasks';
update permission_type set name = 'Billing Staff Report' where name = 'Billing Department Tasks';
update permission_t... | true |
4cb592f7a5d78d6a1b255cc1a73b4b0644eac8d0 | SQL | Rekkuj/loppuprojekti | /src/test/resources/schema.sql | UTF-8 | 983 | 3.75 | 4 | [] | no_license | CREATE TABLE if not exists groups (
groupid int AUTO_INCREMENT PRIMARY KEY NOT NULL,
groupname varchar NOT NULL,
teachers array,
pupils array,
missionscores int
);
CREATE UNIQUE INDEX groups_groupname_uindex ON groups (groupname);
CREATE TABLE if not exists users (
id int AUTO_INCREMENT PRIMARY... | true |
f0834c5de1501cf32c2ae55049b3f6ecb3ecf43b | SQL | thangduong3010/PL-SQL | /opp6code/ch05_code.sql | UTF-8 | 7,034 | 3.75 | 4 | [] | no_license | /*
Oracle PL/SQL Programming 5th Edition
www.stevenfeuerstein.com/books
Objection creation and example scripts for Chapter 5
You will find below all non-trivial code snippets from the above chapter
that are NOT contained in their own files (as specified in the chapter),
plus any DDL object creation scripts required ... | true |
ce2eb54f5a2020f960e11275e73fa9a72dd136ff | SQL | cckmit/share-wifi | /scripts/share-wifi.sql | UTF-8 | 8,059 | 3.734375 | 4 | [
"Apache-2.0"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50505
Source Host : localhost:3306
Source Database : share-wifi
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2020-08-28 17:27:33
*/
SET FOREIGN_KEY_CHECKS=0;
-... | true |
c356017186798abdf7a9434da34efb455c2f7713 | SQL | ggg008/mygit | /ACORN_AI/sqlfiles/sungjuk_my.sql | UTF-8 | 6,782 | 3.953125 | 4 | [] | no_license | -- --------------------------------------------------------
-- 호스트: 192.168.0.106
-- 서버 버전: 10.3.17-MariaDB - MariaDB Server
-- 서버 OS: Linux
-- HeidiSQL 버전: 11.0.0.5919
-- --------------------------------------------------------
/*... | true |
4ca995c46d36f540ca8310d2f3817a8cb3de7a40 | SQL | Michael-Xie/BootcampX | /4_queries/13_name_of_teachers_and_number_of_assistances_in_cohort.sql | UTF-8 | 336 | 3.859375 | 4 | [] | no_license | SELECT teachers.name as teacher, cohorts.name as cohort, count(*) as total_assistances
FROM teachers
JOIN assistance_requests ON (teachers.id = teacher_id)
JOIN students ON (student_id = students.id)
JOIN cohorts ON (cohort_id = cohorts.id)
WHERE cohorts.name = 'JUL02'
GROUP BY teachers.name, cohorts.name
ORDER B... | true |
fc7e0a9c869e3404899d18e0e4000c31fe4c789d | SQL | Rodrigo-Novas/Transacr-Sql | /CentroMedicoScripts/CentroMedicoScripts/Crear FK.sql | UTF-8 | 357 | 3 | 3 | [] | no_license |
--Creo llave foranea para pacientes y pais
ALTER TABLE Pacientes
ADD FOREIGN KEY (idPais) REFERENCES Pais(idPais)
--Creo llave foranea para Pacientes y historiaPaciente
ALTER TABLE HistoriaPaciente --alter table es la tabla que contiene la foreign key y la referencia es la que contiene la PK
ADD FOREIGN KEY(idPacie... | true |
e3dfdf2bf2476bbe55f174e06c3f6431787a18ff | SQL | cruzer42/Springboard-MiniProjects | /MiniProject2-SQL/EC_sql_project.sql | UTF-8 | 8,377 | 4.4375 | 4 | [] | no_license | /* Welcome to the SQL mini project. For this project, you will use
Springboard' online SQL platform, which you can log into through the
following link:
https://sql.springboard.com/
Username: student
Password: learn_sql@springboard
The data you need is in the "country_club" database. This database
contains 3 ... | true |
034ad34b9fbba4f41817fd8758ac54de5b1ccc79 | SQL | Manu1ND/sip | /sip.sql | UTF-8 | 4,550 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 16, 2020 at 08:58 PM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
c7f9d4dcce9851c797aa7240b41a2af2e97c3393 | SQL | gtenorio10/Codecademy_DS | /SQL/Unit3_5/Hacker_News_Project.sql | UTF-8 | 2,204 | 4.6875 | 5 | [] | no_license | /* Look at table, What are the top stories w/ highest score */
SELECT title, score
FROM hacker_news
ORDER BY score DESC
LIMIT 5;
/*First, find the total score of all the stories.*/
SELECT SUM(score) AS Total_Score
FROM hacker_news;
--6366
/* Find the individual users who have gotten combined scores of more than 200, ... | true |
e4281a335ce0989e0b68eaee0e439d67c8672592 | SQL | ismailgunduz7/Patika.dev | /Java ile Backend Web Development/SQL/Odev 12/query2.sql | UTF-8 | 91 | 3.015625 | 3 | [] | no_license | SELECT COUNT(*)
FROM film
WHERE film.rental_rate =
(
SELECT MAX(rental_rate)
FROM film
) | true |
a8fe7ebcf119157c3be2854033027aa85f75f46a | SQL | doougui/b7web_php | /projeto_rating/projeto_rating.sql | UTF-8 | 2,408 | 3.359375 | 3 | [] | no_license | -- --------------------------------------------------------
-- Servidor: 127.0.0.1
-- Versão do servidor: 5.7.26 - MySQL Community Server (GPL)
-- OS do Servidor: Win64
-- HeidiSQL Versão: 9.5.0.5196
-- --------------------------------------------------------
/*... | true |
04fc8373734a48f394081c731ce1a9e5c9165285 | SQL | RadovanG/Auk | /bizkodaukcije(2).sql | UTF-8 | 9,757 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 22, 2018 at 06:16 AM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
230e6d02a6a04d7029d89620c11ba0d2d3a01364 | SQL | itspladd/quiz-app | /src/db/schema/11_results.sql | UTF-8 | 270 | 2.984375 | 3 | [] | no_license | DROP TABLE IF EXISTS results CASCADE;
CREATE TABLE results (
id SERIAL PRIMARY KEY NOT NULL,
session_id INTEGER REFERENCES quiz_sessions(id) ON DELETE CASCADE,
total_views INTEGER DEFAULT 0,
unique_views INTEGER DEFAULT 0,
quizzes_started INTEGER DEFAULT 0
); | true |
adf4b2b6b2346945be0d901afee9b4750019b803 | SQL | bapplewh/brooke_barker_university_db_mysql_project | /group-students-by-course.sql | UTF-8 | 205 | 3.234375 | 3 | [] | no_license | USE mysql_capstone_schema;
-- group students by courses
SELECT student.student_name, course.course_name
FROM course
JOIN grade
ON course_id = grade_course_id
JOIN student
ON grade_student_id = student_id; | true |
8fb33ab944647afb05b9aa976f03e781a4069e79 | SQL | klaseskilson/mottagningen | /getads.sql | UTF-8 | 144 | 3.734375 | 4 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | SELECT ads.*, COUNT(ad_id) AS ads_count
FROM ads
LEFT JOIN ad_views ON ads.id = ad_views.ad_id
GROUP BY ads.id
ORDER BY ads_count
LIMIT 3
| true |
6964c0582cf7544a065e72a9138428e3244c4801 | SQL | rekharokkam/t-sql | /Learning SQLForOracle/CreatingTablesAndManipulatingDatabase/Chaning DataInATable.sql | UTF-8 | 1,665 | 4.4375 | 4 | [] | no_license | /*
Always run select statement first before running the Uodate statement to make sure the conditions are correct.
*/
select * from book
where title = 'Analyzing the Obsessive'
update book set price = 17.99 where title = 'Analyzing the Obsessive'
select * from book
where ytd_sales > 10000
update book set price = (... | true |
1216a5dbfac1e4d556cf5347fe1e877287dd25fc | SQL | Abhishek-Kaudare/SockeIO-APP | /database/sql files/sparx_v1.sql | UTF-8 | 3,947 | 3.3125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Feb 22, 2019 at 12:25 PM
-- Server version: 5.7.25-0ubuntu0.18.04.2
-- PHP Version: 7.2.15-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
d3716d662e5baa02e29b0415415204ce151f119b | SQL | naresh-nandu/NanduGST | /WePGSTDB/dbo/Stored Procedures/usp_Retrieve_GSTR2CDNUR_SA.sql | UTF-8 | 1,384 | 3.5 | 4 | [] | no_license |
/*
(c) Copyright 2017 WEP Solutions Pvt. Ltd..
All rights reserved
Description : Procedure to Retrieve the GSTR2 CDNUR Records from the corresponding staging area tables
Written by : Sheshadri.mk@wepdigital.com
Date Who Decription
06/15/2017 Seshadri Initial Version
08/02/2017 Seshadri Introduced flag c... | true |
ae55b658650e6778671bccc3bad2bdaf087befd7 | SQL | fbrute/pm_aot_tfeuilla | /source/pm_hourly_average_2010.sql | UTF-8 | 790 | 3.96875 | 4 | [] | no_license | drop table if exists pm_hourly_average;
CREATE TABLE pm_hourly_average
(
year smallint,
month smallint,
day smallint,
julian_day smallint,
heure smallint,
pm10 smallint
);
insert into pm_hourly_average (select year(datetime) as year,
month(datetime) as month, day(datetime) as day,
cast(da... | true |
4f30e237d580fe92a65c88e3d6708181d5414983 | SQL | AlexandreBruno/prjNegociacao | /docs/PRODUTO.sql | UTF-8 | 235 | 3.03125 | 3 | [] | no_license | CREATE TABLE PRODUTO (
ID INTEGER NOT NULL,
NOME VARCHAR(255),
VALOR DECIMAL(18,2));
ALTER TABLE PRODUTO
ADD CONSTRAINT PK_PRODUTO
PRIMARY KEY (ID);
CREATE SEQUENCE PRODUTO_ID;
ALTER SEQUENCE PRODUTO_ID RESTART WITH 1;
| true |
e252023e01099b0e2bd66ba23e756769a6db9d75 | SQL | brunadiast/banco-de-dados- | /tabela 1 trimestre/tabelafuncionario.sql | UTF-8 | 194 | 2.859375 | 3 | [] | no_license | select funcionario.nome,
funcionario_dependente.nome,
funcionario_dependente.nascimento
from funcionario join funcionario_dependente
on pk_funcionario=fk_funcionario
where parentesco='filho'; | true |
6dc99b1604356f85d062bb018c9a580f47d52738 | SQL | mlkulmala/ot-harjoitustyo-1 | /Shamery/src/main/resources/db_init.sql | UTF-8 | 402 | 3.734375 | 4 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | CREATE TABLE IF NOT EXISTS ScoreType (
name TEXT UNIQUE
);
INSERT OR IGNORE INTO ScoreType (name) VALUES ("Points Game"), ("Time Trial");
CREATE TABLE IF NOT EXISTS Player (
name TEXT UNIQUE
);
CREATE TABLE IF NOT EXISTS Score (
player_id INT,
score_type_id INT,
score INT,
FOREIGN KEY (player_id) REFEREN... | true |
d7b46550f6766b4c204ae4f1e076685bb3acd44e | SQL | joud-almahdi/SeniorProject | /Dump20210211/rms_database_review.sql | UTF-8 | 2,412 | 3.125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64)
--
-- Host: localhost Database: rms_database
-- ------------------------------------------------------
-- Server version 8.0.23
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */... | true |
6905e986ee365afef940fb8200ac02b54c9b2e76 | SQL | petroUshtan/Megadel | /scripts/V_201610162010__table coming.sql | UTF-8 | 808 | 3.078125 | 3 | [] | no_license | CREATE TABLE coming
(
id serial NOT NULL,
date timestamp without time zone,
sum double precision,
provider_id bigint,
user_id bigint,
CONSTRAINT coming_primary_key PRIMARY KEY (id),
CONSTRAINT coming_provider_foreing_key FOREIGN KEY (provider_id)
REFERENCES provider (id) MATCH SIMPLE
ON UPDATE... | true |
5019f3a0b56523d491843de2f54b888287b1512a | SQL | PraneethaNL/Ecommerce-website-for-buying-books | /ecommerce/project.sql | UTF-8 | 15,466 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 06, 2016 at 08:07 PM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
f863b570374475aad5c7c4c8e7ea4d05bbed6362 | SQL | jostvi/BagpackerDemo2 | /Bagpacker webb-applikation/localhost code/bagpacker_database.sql | UTF-8 | 22,675 | 3.265625 | 3 | [] | no_license | drop table if exists all_items;
drop table if exists temperature;
drop table if exists transport;
drop table if exists accommodation;
drop table if exists activities;
drop table if exists climate_classification
drop table if exists saved_lists;
drop table if exists weather_data;
CREATE TABLE all_items (
id SERIAL PR... | true |
47c5b09748246c56944b81c38905b688bcbb402e | SQL | ameer810/MyExeApp | /SQL/StructuerOnly.sql | UTF-8 | 9,892 | 2.75 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64)
--
-- Host: localhost Database: tahlel2
-- ------------------------------------------------------
-- Server version 8.0.23
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ... | true |
1addd46fe0ec54023a3da524b49e3ae1554d0768 | SQL | MatheusEduard/TCC-S.O.S | /requisitos_ivo.sql | UTF-8 | 565 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | insert into usuario (nome_usuario,cpf_usuario,senha_usuario,email_usuario)
values ('rapaz1','122.234.523-10','12345','rapaz1@gmail.com'),
('rapaz2','123.234.523-10','12345','rapaz2@gmail.com'),
('rapaz3','124.234.523-10','12345','rapaz3@gmail.com'),
('rapaz4','125.234.523-10','12345','rapaz4@gmail.... | true |
95c39bdaef7fb00bab4e01cce8331b4602ef1e14 | SQL | jschmitt-mscs/1714jschmitt | /1714jschmitt2a/SQLQuery1.sql | UTF-8 | 3,089 | 3.96875 | 4 | [] | no_license | -- Joe Schmitt
-- Exercise 2A: Table Queries
-- 2A.1) Building, Apartment tables
SELECT Building.BuildingId, Building.BuildingName, Apartment.ApartmentNum, Apartment.Rent
FROM Building INNER JOIN
Apartment ON Building.BuildingId = Apartment.BuildingId
ORDER BY Building.Buildi... | true |
9b6587426f411747e0ab2def1e4c81c68f5211d5 | SQL | hackerlyss/employee_tracker | /schema.sql | UTF-8 | 758 | 3.453125 | 3 | [
"MIT"
] | permissive | USE process.env.MYSQL_HOST
CREATE TABLE employee_tracker (
id INT(3) NOT NULL AUTO_INCREMENT,
first_name VARCHAR(15) NOT NULL,
last_name VARCHAR(35) NOT NULL,
title VARCHAR(25)NOT NULL,
title_id INT,
FOREIGN KEY (role_id) REFERENCES role(id),
department VARCHAR(20) NOT NULL,
salary INT(... | true |
d6dcd3e531cd7cecb0b9580ad3c3e319d9024cdb | SQL | sarakhmen/spring-final-project | /src/main/resources/data.sql | UTF-8 | 1,859 | 2.78125 | 3 | [] | no_license | REPLACE INTO roles VALUES (1,'ADMIN');
REPLACE INTO roles VALUES (2,'USER');
REPLACE INTO users VALUES (1, true, 'artur.sarahman@gmail.com', '$2a$12$IcsJIPLyMdHog5ntehnhW.9eMn7J9U1iR3d8hpoJHjWeCLavwdrSm', 'Artur Sarakhman');
REPLACE INTO user_role VALUES (1, 1);
REPLACE INTO users VALUES (2, true, 'user@gmail.com', '$2... | true |
b8085ebd1f1b1d898eeb7a05c3e31efaf42d723e | SQL | codacy-badger/sample | /module/tracer/schema.sql | UTF-8 | 4,667 | 3.53125 | 4 | [
"MIT"
] | permissive | DROP TABLE IF EXISTS `accomplishment`;
CREATE TABLE `accomplishment` (`accomplishment_id` int(10) UNSIGNED NOT NULL auto_increment, `accomplishment_active` int(1) UNSIGNED NOT NULL DEFAULT 1, `accomplishment_created` datetime NOT NULL, `accomplishment_updated` datetime NOT NULL, `accomplishment_name` varchar(255) DEFA... | true |
27466787bb583dbea42dcf9e8b86606323137969 | SQL | rabiasungur/SQL-Challenge | /EmployeeSQL/queries.sql | UTF-8 | 2,459 | 4.46875 | 4 | [] | no_license | -- 1. List the following details of each employee: employee number, last name, first name, sex, and salary.
select e.emp_no, e.last_name, e.sex, s.salary
from employees as e
right join salaries as s
on e.emp_no = s.emp_no
-- 2. List first name, last name, and hire date for employees who were hired in 1986.
select fi... | true |
c57ab7b8e525b494362748e12bce6211ebd5bd5f | SQL | hearsid/hackerrank | /__sql/aggregation/weather-observation-station-17.sql | UTF-8 | 108 | 3.140625 | 3 | [] | no_license | select round(LONG_W, 4) from station where
LAT_N = (select min(LAT_N) from station where LAT_N > 38.7780 )
| true |
ca265a73ccfafc4880c1656620ad286ccaf2099e | SQL | NicePlayOfU/leetcode | /sql/1050.actors-and-directors-who-cooperated-at-least-three-times 合作至少三次的演员和导员/1.sql | UTF-8 | 208 | 3.4375 | 3 | [] | no_license | # Link: https://leetcode-cn.com/problems/actors-and-directors-who-cooperated-at-least-three-times
SELECT `actor_id`, `director_id`
FROM `ActorDirector`
GROUP BY `actor_id`, `director_id`
HAVING COUNT(*) >= 3 | true |
f965e755666a0bfccadd60251acb5d2fa71d3a0d | SQL | devtixq/PHP-Proje-Baslangic | /paketioc_panel.sql | UTF-8 | 2,369 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Anamakine: localhost:3306
-- Üretim Zamanı: 24 May 2021, 20:36:24
-- Sunucu sürümü: 10.2.37-MariaDB-cll-lve
-- PHP Sürümü: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... | true |
5a6df9fe980ba50b2e307d02b06542e53492a759 | SQL | ganeshbabuNN/Databases | /RDMS/Oracle Database/cust_view1_view.sql | UTF-8 | 167 | 3.015625 | 3 | [] | no_license | create view cust_view1 of cust_t with object identifier(cust_code)
as select c.cust_code,c.cust_name,c.city,
make_ref(productview, c.productcode)
from cust_table c
/
| true |
4d90594c038e002ae7d6eb7759a02444e150e2ec | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day10/select1646.sql | UTF-8 | 177 | 2.625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-09T16:46:00Z' AND timestamp<'2017-11-10T16:46:00Z' AND temperature>=8 AND temperature<=72
| true |
1334c7873eb79864a0b1a3aebe19fe2c77c24a6d | SQL | rabiasungur/ETL-Challenge | /QuickDBD-ETL_Challenge.sql | UTF-8 | 2,206 | 3.28125 | 3 | [] | no_license | -- Exported from QuickDBD: https://www.quickdatabasediagrams.com/
-- Link to schema: https://app.quickdatabasediagrams.com/#/d/b3jgV3
-- NOTE! If you have used non-SQL datatypes in your design, you will have to change these here.
CREATE TABLE "airline" (
"IATA_CODE" varchar(2) NOT NULL,
"Airline-" varchar(... | true |
ccab043954cd9e4cb18d23b96f90c252f1e97fdd | SQL | Momayaz/pinchOfSalt | /data/seed.sql | UTF-8 | 763 | 2.5625 | 3 | [
"MIT"
] | permissive | INSERT INTO recipes (name, category, area, image_url, video_url, ingredients, instructions ) VALUES (
'Grilled Chicken',
'Chicken',
'Canadian',
'https://www.onceuponachef.com/images/2020/05/best-grilled-chicken-scaled.jpg',
'https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ah... | true |
b585b9e590162f8471c36acde1b0f12718b8c4d7 | SQL | qmajid/PaymentChain | /create_block_table.sql | UTF-8 | 291 | 2.859375 | 3 | [] | no_license | -- Table: public.block
-- DROP TABLE public.block;
CREATE TABLE public.block
(
block_id integer NOT NULL,
block_index bigint,
block_time bigint,
block_data text,
CONSTRAINT block_pkey PRIMARY KEY (block_id)
)
WITH (
OIDS=FALSE
);
ALTER TABLE public.block
OWNER TO postgres;
| true |
a419b12e133a67d0681822681320c4dfe2c1841d | SQL | araminu2000/mavenbibliothouris | /src/main/resources/data/DB12Mar2013.sql | UTF-8 | 2,924 | 3.328125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : local-dbs
Source Server Version : 50529
Source Host : localhost:3306
Source Database : bibliothouris
Target Server Type : MYSQL
Target Server Version : 50529
File Encoding : 65001
Date: 2013-03-12 15:02:13
*/
SET FOREIGN_KEY_CHECKS=0;... | true |
cc50510f5c245587d23a13221e3a68e74cfa9faf | SQL | stuartphp/usemycv | /database/swift.sql | UTF-8 | 21,206 | 3.234375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 12, 2021 at 07:44 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
5bd3f3990edf7b08462403948790a89b3b73c5c4 | SQL | VasilevIvanVladimirovich/WEB-Course | /Курс/Labs/Lab8/company.sql | UTF-8 | 3,256 | 3.390625 | 3 | [] | no_license | <h2 align=center> У нас в продаже </h2>
<table border="1" width="60%" align=center>
<tr>
<th> Номер продукта</th>
<th> Наименование</th>
<th>Цена</th>
</tr>
<?php
while ($row=mysqli_fetch_array($result))
{
?>
<tr>
<td><?php print $row["prod_id"]?>... | true |
9f8a4e86d16a1061f8518eaa2c8b77277bc29fb8 | SQL | solgonzalez/proyecto2bases | /Scripts/Procedures/Deletes.sql | UTF-8 | 2,824 | 3.9375 | 4 | [] | no_license | #FECHA: 6 JUNIO 2016
#AUTOR: MARIELA BARRANTES
#DESCRIPCION: STORED PROCEDURE - DELETE
DELIMITER //
#DELETES CATALOGOS
#DELETE COLOR
CREATE procedure DELETE_COLOR(IN pID INT)
BEGIN
DELETE FROM COLOR
WHERE id=pID;
END//
#DELETE CUERPO
CREATE procedure DELETE_CUERPO(IN pID INT)
BEGIN
DELETE FROM CUERPO
WHERE... | true |
b9e515916098b8b752eb27a4abf62715adbaf14d | SQL | qhit2017/GR1702_01 | /④SQLServer数据库/IT02_12.20/1702_三组作业_12.20/冯晨婕12.20/SQLQuery作业.sql | GB18030 | 5,022 | 4 | 4 | [] | no_license | use db_staff
create table tb_student(
sno char(11) primary key,
sname char(20),
ssex char(2) check(ssex=''or ssex='Ů')default'',
sage smallint,
sdept char(20),
grade smallint )
select sno,sname,ssex,sage,sdept,grade from tb_student
--
select *FROM tb_student
insert into tb_student(sno,sname,ssex,sage,sdept,grade)
va... | true |
d4da06adf8ec25b714ba371af891a6d7a1b15745 | SQL | arskell/database-manager | /database/create_queries/client_transactions.sql | UTF-8 | 315 | 2.84375 | 3 | [] | no_license | CREATE TABLE if not exists 'client_transactions' (
'id' INTEGER PRIMARY KEY AUTOINCREMENT,
'client_id' INTEGER NOT NULL,
'product_id' INTEGER NOT NULL,
'weight' FLOAT(24) NOT NULL,
'price_per_unit' FLOAT(24) NOT NULL,
'date' datetime default current_timestamp NOT NULL,
'transaction_id' INTEGER NOT NULL
); | true |
1b42b206dfb3f758f7a6e4a68d8847d366362567 | SQL | SaqibHussain/Dragonhat | /src/dragonhat/dragonhat.sql | UTF-8 | 2,169 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Dim 09 Mars 2014 à 10:03
-- Version du serveur: 5.6.12-log
-- Version de PHP: 5.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
d46d4eb9f38b49575851895d6a9158232a9fc751 | SQL | micwa/ucla-cs143 | /project1a/queries.sql | UTF-8 | 892 | 4.65625 | 5 | [] | no_license | -- Names of all actors in "Die Another Day"
SELECT CONCAT(first, ' ', last)
FROM MovieActor
INNER JOIN Actor ON MovieActor.aid = Actor.id
WHERE mid =
(SELECT id FROM Movie
WHERE title = 'Die Another Day');
-- Count of all actors who have acted in multiple movies
SELECT COUNT(DISTINCT ma1.aid)
FROM MovieActor ... | true |
eb6f0143852bff2d5f7c9311ab18344b1a172ffd | SQL | chickswag/PrefixMapping | /script.sql | UTF-8 | 2,375 | 4.03125 | 4 | [] | no_license | -- Student Table
CREATE TABLE `student' (
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(100) NOT NULL,
`age` SMALLINT NULL,
`grade` SMALLINT NULL,
`teacher_id` INT NULL,
`subject_id` VARCHAR(100) NOT NULL,
`created_by` INT NOT NULL,
`status_id` SMALLINT NOT NULL DEFAULT 1 ;
`created_at` TIMESTAMP ... | true |
58be1141759003273513aea17f07ecf56774bd72 | SQL | blackbeltandre/qibla_swarm | /server/db/migrations/20200712113030-create_table_term_conditions.sql | UTF-8 | 472 | 2.75 | 3 | [] | no_license | -- +migrate Up
CREATE TABLE IF NOT EXISTS "term_conditions"
(
"id" char(36) PRIMARY KEY NOT NULL DEFAULT (uuid_generate_v4()),
"term_name" varchar(50) NOT NULL,
"term_type" varchar(30) NOT NULL,
"description" text NOT NULL,
"created_at" timestamp ... | true |
3ae89d35912f6ebd944f2d7dcd646af77295a3af | SQL | RyuChaehyeong/jsp20201103 | /WebContent/WEB-INF/sql/function/functionEx1.sql | UHC | 2,287 | 3.875 | 4 | [] | no_license | SELECT sysdate
FROM dual;
SELECT LOWER(ename) AS name FROM employee;
SELECT UPPER(ename) AS name FROM employee;
SELECT INITCAP('oracle mania') AS name FROM dual;
--å
select 'Oracle mania', UPPER('Oracle mania'), LOWER('Oracle mania'), INITCAP('Oracle mania')
from dual;
select ename, lower(ename), job, initcap(job)... | true |
2beddb60cfd71da35b60781327ae9d4ff040135b | SQL | SuperBruceWon/shop-admin | /scripts/db/init-db.sql | UTF-8 | 949 | 3.71875 | 4 | [] | no_license | create table CELLPHONE(
ID identity,
BRAND varchar(64) not null,
MODEL varchar(64) not null,
OS varchar(64) not null,
CPU_BRAND varchar(64) not null,
CPU_CORE_COUNT integer not null,
RAM integer not null, -- 单位:GB
STORAGE integer not null, -- 单位:GB
COLOR varchar(64) not null,
DESCRIPTION varchar(128... | true |
55aa171fb31fe7f09d199c90d4cc059ef660176e | SQL | dba-kosova/OracleScripts | /work/check_pre_2ro.sql | UTF-8 | 210 | 2.546875 | 3 | [] | no_license | SELECT s.*, v.*
FROM v$session s, v$transaction v, SYS.x_$ktuxe t
WHERE v.xidusn = ktuxeusn
AND v.xidslot = ktuxeslt
AND v.xidsqn = ktuxesqn
AND s.taddr = v.addr
AND t.ktuxecfl = 'DEAD'
/
| true |
2c1f6540805226a930ff8ffc5777489458026f09 | SQL | EerikSaksi/stat_buff | /backend/src/migrations/committed/000011.sql | UTF-8 | 1,355 | 3.390625 | 3 | [] | no_license | --! Previous: sha1:34267d94e82f16a798bb30e5cf195a9944db60f5
--! Hash: sha1:38f79a787992a715ce6642406bff26c329105536
drop table if exists exercise cascade;
drop type if exists body_part_enum ;
create type body_part_enum as enum ( 'Back' , 'Biceps' , 'Chest' , 'Core' , 'Forearms' , 'Legs' , 'Shoulders' , 'Triceps' , 'W... | true |
bdf1b780c25d6ca617af7651f49c128cec41e4e9 | SQL | DhakalRupesh/OOPHP | /queries.sql | UTF-8 | 265 | 2.640625 | 3 | [] | no_license | -- create table user
create table users(
id int not null auto_increment,
username varchar(20) not null,
email varchar(30) not null,
primary key (id)
);
create table posts(
id int not null auto_increment,
title varchar(255) not null,
body text,
primary key(id)
); | true |
05576ae84cc0a1c66219f30d49706e4ecf6cb03b | SQL | HenokZegeye/php-project | /marketplace_v2 (3).sql | UTF-8 | 8,231 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 20, 2019 at 02:21 PM
-- Server version: 5.7.26-0ubuntu0.16.04.1
-- PHP Version: 7.0.33-0ubuntu0.16.04.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
6154d47391d0c90a75e152c438ebdfa8c253892b | SQL | dhavelock/comp421 | /create_views.sql | UTF-8 | 801 | 4.34375 | 4 | [] | no_license | -- create a view to see all information about all menu items --
CREATE OR REPLACE VIEW all_menu_info AS
SELECT menuitems.item_name, description, price, menu_name
FROM menuitems
LEFT JOIN menutomenuitems
ON menuitems.item_name = menutomenuitems.item_name
ORDER BY price DESC;
-- create a view to see most popular menu i... | true |
7db7546f2a3fba16fb57f21dc59eefd78e9d1ea8 | SQL | milicakojicic/Ketering-sluzba | /База/event_triggers.sql | UTF-8 | 732 | 2.796875 | 3 | [] | no_license | use ketering_sluzba;
DELIMITER $$
CREATE EVENT `brisanje_event` ON SCHEDULE EVERY 1 DAY STARTS TIMESTAMP(CURRENT_DATE,'02:00:00') ON COMPLETION PRESERVE ENABLE DO
BEGIN
DELETE FROM meni
WHERE datum < CURRENT_DATE - INTERVAL (SELECT period_cuvanja_menija FROM podesavanja_sistema) DAY;
DELETE FROM nar... | true |
decde34246a696fa4b22c2365f3fe6771b4e0ec3 | SQL | jiyoung4061/servlet-practices | /guestbook01/sql/sqlscripts.sql | UTF-8 | 496 | 3.46875 | 3 | [] | no_license | select * from emaillist;
select count(*)
from emaillist
order by no desc;
delete from guestbook where no=1 and password = '1234';
desc guestbook;
-- insert
insert
into guestbook
values(null, '안대혁', '1234', '안녕하세요~', now());
-- select
select name, password, message, date_format(reg_date, '%Y년 %m월 %d일' ) as regDate... | true |
2ad321098f0aeb2b308f25b304e6f9cec373d2ca | SQL | alu0101116013/ADBD_GRUPO-8 | /Generación de Código/TRIGGERS/fichajes.sql | UTF-8 | 1,026 | 3.359375 | 3 | [] | no_license | USE `futbol`
DELIMITER $$
CREATE TRIGGER `fichajes` BEFORE INSERT ON JUGADORES FOR EACH ROW
BEGIN
SET @presupuestoEquipo = (SELECT Presupuesto FROM EQUIPO WHERE `Código equipo` = NEW.`Código equipo`);
-- Se comprueba que se tenga presupuesto suficiente para fichar al jugador
IF (@presupuestoEquipo < NEW.`Valor de ... | true |
b775d57e3bf89fe3e54c1c5892dab44c0d4a49c1 | SQL | Quest84/ProyectoDB | /Tablas.sql | UTF-8 | 7,957 | 3.75 | 4 | [] | no_license | /*Tabla Institucion*/
CREATE TABLE institucion(
id_escuela int NOT NULL,
matricula varchar(30) NOT NULL,
nombre varchar(100) NOT NULL,
ubicacion varchar(30) NOT NULL,
telefono varchar(15) NOT NULL,
correo varchar(30) NOT NULL,
CONSTRAINT pk_escuela PRIMARY KEY (id_escuela)
);
/*Tabla carreras*/
CREATE TABLE carr... | true |
ffa4732b67dc955799d7a11031aefd1f725a1113 | SQL | dooley/osm_address_db | /sql/planetPolyRestoreForFullUpdate.sql | UTF-8 | 219 | 2.90625 | 3 | [] | no_license |
-- Moves data from temporaray update-Table for current full update
WITH moved_rows AS (
DELETE
FROM update_polygon_full u
RETURNING u.*
)
INSERT INTO update_polygon
SELECT * FROM moved_rows
ON CONFLICT DO NOTHING;
| true |
862ec1e8705a5e0fe28fe931f65e8d253419501e | SQL | steffandsv/RemediosNaturais | /Backend/rest-api.sql | UTF-8 | 608 | 2.59375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `categorias` (
`id` int(11) NOT NULL AUTO_INCREMENT ,
`titulo` varchar(360) NOT NULL ,
`imagem` longtext NOT NULL ,
`descricao` tinytext NOT NULL ,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
CREATE TABLE IF NOT EXISTS `remedios` (
`id` int(11) NOT NULL ... | true |
1aaa7f0ff78288bc41bedcfe66f99c7149a93a0a | SQL | baovien/dbz-flask | /scripts/mysql/update_adb.sql | UTF-8 | 1,882 | 3.9375 | 4 | [] | no_license | USE covid_adb;
REPLACE INTO FACT_country_events (iso_code, continent_id, population, median_age, total_cases, total_deaths,
total_tests)
SELECT DISTINCT C.iso_code,
CC.continent_id,
S.population,
S.median_age,
SUM(E.new_... | true |
c95a139eff1f9f77674bd7b038525d0dbac21c3e | SQL | bellmit/CloudShopBootStrap | /gxsql/1.0.0/1.0.2_dml_iplog_create.sql | UTF-8 | 434 | 2.78125 | 3 | [] | no_license | --登陆日志表
CREATE TABLE `iplog` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`ip` varchar(50) NOT NULL,--登陆ip
`loginstate` tinyint(4) NOT NULL,--登录状态
`username` varchar(50) DEFAULT NULL,--用户名
`logintime` datetime NOT NULL,--登录时间
`usertype` tinyint(4) DEFAULT NULL,--用户类型:0前台用户 1后台用户
PRIMARY KEY (`id`)
) ENGI... | true |
a2e34806d5b46776ec5aff94cb42012b4f9312b5 | SQL | ClickHouse/ClickHouse | /tests/queries/0_stateless/00962_enumNotExect.sql | UTF-8 | 617 | 2.703125 | 3 | [
"BSL-1.0",
"Apache-2.0"
] | permissive | DROP TABLE IF EXISTS t_enum8;
CREATE TABLE t_enum8( x Enum('hello' = 1, 'world' = 2) ) ENGINE = TinyLog;
INSERT INTO t_enum8 Values('hello'),('world'),('hello');
SELECT * FROM t_enum8;
SELECT CAST(x, 'Int8') FROM t_enum8;
DROP TABLE t_enum8;
DROP TABLE IF EXISTS t_enum16;
CREATE TABLE t_enum16( x Enum('hello' = 1, 'wor... | true |
f37b6f6d5b8a87c0e4c130ebee26999cf5129a60 | SQL | lpy2017/smart-cd- | /Smartflow_db/frame_mysql_dbscript/mysql/F_FRAME_SEQUENCE.sql | UTF-8 | 2,037 | 3.265625 | 3 | [] | no_license | CREATE TABLE SYS_SEQUENCE (
NAME varchar(50) NOT NULL,
CURRENT_VALUE int(11) NOT NULL DEFAULT '0',
INCREMENT int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (NAME)
);
INSERT INTO SYS_SEQUENCE(NAME,CURRENT_VALUE,INCREMENT) VALUES('sequenceName', 1,1);
INSERT INTO SYS_SEQUENCE(NAME,CURRENT_VALUE,INCREMENT) VAL... | true |
657574c3caed535638bc9618e4490dfffb8041b9 | SQL | petefield/ha.hub | /scene query.sql | UTF-8 | 275 | 3.53125 | 4 | [
"MIT"
] | permissive | select s.id, s.Name [Scene Name], d.Name [Device Name], ds.CommandName, ds.Parameters
from DeviceStates ds
inner join Scenes s on s.Id = ds.DbSceneId
inner join Devices d on d.Id = ds.DeviceId
order by s.Name, ds.ExecutionOrder
select * from scenes
select * from devices
| true |
3f4a00a1fa52942c44e6f4775c6f43bddb35850e | SQL | TetyanaYakymenko/JavaExternal | /finalProject/SQLScripts_Create_Control_Conferences.sql | UTF-8 | 4,244 | 3.6875 | 4 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema control_c... | true |
5d03ed7f43a1707e6cfb745430a3df6c4e1e64a0 | SQL | JoakimLevorsen/Monopoly-Software-Projekt | /Database.sql | UTF-8 | 14,193 | 3.421875 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Sun May 19 19:38:01 2019
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON... | true |
2e61928d7ecbba8e7ffd9e7e3be3bb88b340af9d | SQL | li-zhang-yu/mybatiscodeReview | /src/main/resources/db.sql | UTF-8 | 426 | 2.78125 | 3 | [] | no_license | CREATE TABLE `person` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`name` varchar(32) NOT NULL COMMENT '姓名',
`age` int(11) NOT NULL COMMENT '年龄',
`phone` VARCHAR(16) DEFAULT NULL COMMENT '电话号码',
`email` varchar(255) DEFAULT NULL COMMENT '邮箱',
`address` varchar(255) DEFAULT NULL COMMENT '地址',
PRIM... | true |
0ffa9f185333b8966bc3cd1250bdf2c8e858a335 | SQL | D-landJS/Crud-JavaWeb | /ScriptSQL/parking.sql | UTF-8 | 1,225 | 3.484375 | 3 | [] | no_license | CREATE DATABASE parking;
USE parking;
DROP TABLE conductor;
CREATE TABLE conductor(
id_conductor INT NOT NULL AUTO_INCREMENT,
nombre VARCHAR(55) NOT NULL,
apellido VARCHAR(55) NOT NULL,
dni VARCHAR(8) NOT NULL,
nroBrevete VARCHAR(55) NOT NULL,
id_auto INT,
PRIMARY KEY (id_conductor),
CONST... | true |
9bab16ccda0006eef8777e637563bf4b0d853682 | SQL | sprokushev/Delphi | /MASTER/_DATABASE/Tables/KLS_GD_GROUP.sql | WINDOWS-1251 | 500 | 3.171875 | 3 | [] | no_license | --
-- KLS_GD_GROUP (Table)
--
CREATE TABLE MASTER.KLS_GD_GROUP
(
ID NUMBER(10) NOT NULL,
ABBR VARCHAR2(10 BYTE),
NAME VARCHAR2(30 BYTE)
)
TABLESPACE USERS2
NOCOMPRESS ;
COMMENT ON TABLE MASTER.KLS_GD_GROUP IS ' / ';
COMMENT ON COLUMN MASTER.KLS_GD_GROUP.ID IS ' / ';
COMMENT ... | true |
04e5b469147e16f9145427e5e99b028eefa51d67 | SQL | AtiqSha/WPF_RestAPI_Test | /LocalDB Scripts/Part2_SQL_Query.sql | UTF-8 | 307 | 3.609375 | 4 | [] | no_license | WITH test as (
SELECT p.uniqueName as platformName, w.*, ROW_NUMBER() OVER (PARTITION BY w.platformId ORDER BY w.updatedAt DESC) AS rn
FROM Well as w, platform as p
where w.platformId = p.id
)
SELECT platformName, id, platformId, uniqueName, latitude, longitude, createdAt, updatedAt FROM test WHERE rn=1 | true |
84534be294ce3cac087ea32251059690b675ea36 | SQL | IsaacZhanghw/letsDateServer | /mysql/admin_with_data.sql | UTF-8 | 1,788 | 2.59375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3309
Source Server Version : 50617
Source Host : localhost:3309
Source Database : an_ju_ke
Target Server Type : MYSQL
Target Server Version : 50617
File Encoding : 65001
Date: 2018-01-05 22:47:51
*/
-- SET FOR... | true |
10d1902e183f14e590f602475110242532414677 | SQL | baligashreya/supermarketmanagementsystem | /prod.sql | UTF-8 | 4,174 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 23, 2019 at 05:33 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
0f8bdc886a8fce1ffa6d82129a20e45b4c721828 | SQL | shroukksobhy/Fake-facebook | /Facebook/facebook.sql | UTF-8 | 2,311 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 14, 2018 at 10:13 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 5.6.36
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... | true |
096689acad11b5a7d4c36b8cd4c2568bcad10b51 | SQL | hotaka-makiuchi/play-compose | /.devcontainer/mysql/sql/1_create_tables.sql | UTF-8 | 895 | 3.328125 | 3 | [] | no_license | SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
-- ---------------------------... | true |
30c151ab75bc30651afa2213894eb335df97d191 | SQL | Siddique1155/mini-cms | /mini-cms.sql | UTF-8 | 2,042 | 3.25 | 3 | [
"MIT"
] | permissive | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET N... | true |
2671b7c799d556991582212774833bf327fc71a8 | SQL | epiii/sister | /lib/dbDump/OLD (dr. server ELYON)/20150522/kon_level.sql | UTF-8 | 974 | 2.875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : lumba2
Source Server Version : 50616
Source Host : 127.0.0.1:3306
Source Database : sister_siadu
Target Server Type : MYSQL
Target Server Version : 50616
File Encoding : 65001
Date: 2015-05-22 07:43:25
*/
SET FOREIGN_KEY_CHECKS=0;
--... | true |
cc31df4b3ce4c67d6218585a89e74ce9b573d132 | SQL | RiedlUK/Res-MOPs-EloDeletedContacts | /Create Table Author Segments.sql | UTF-8 | 10,709 | 3.6875 | 4 | [] | no_license |
SELECT
adr.AUTHOR_STANDARDIZED_NAME AS AUTHOR,
AUTHOR.EMAIL_ADDRESS,
adr.PRID_ID,
adr.INSTITUTE,
COUNT(DISTINCT arts.UID) AS TOTAL_JOURNAL_ARTICLES,
product.DATASALON_CODE,
product.DATASALON_PRODUCT_TITLE,
--Frequency buckets
CASE WHEN frequency.AVERAGE_ARTICLES >= 5 THEN 'High Frequency'
WHEN frequency.AVERAGE_ARTIC... | true |
617485390adfc59d18f06ef5f8b6b3d1ebd75df5 | SQL | nguyenduc2511/C0421G1_NguyenVanDuc_Module3 | /_03_thao_tac_csdl/exercise/bai_2_order.sql | UTF-8 | 1,307 | 4.0625 | 4 | [] | no_license | use quan_ly_ban_hang;
insert into customer (name_c,age_c)
value ('minh quan' , 10), ('Ngoc Oanh', 20), ('Hong Ha',50);
insert into `order` (id_c, date_o)
values (1, '2006-3-21'), (2,'2006-3-23'), (1,'2006-3-16');
insert into product (name_p, price_p)
value ('may giat',3),
('tu lanh',5),
('dieu hoa',7),
('qu... | true |
ef2f6b9aa7b478c99471bf757574edf23b09801c | SQL | WanCheol/Anicom | /WebContent/books.sql | UTF-8 | 411 | 2.921875 | 3 | [] | no_license | CREATE DATABASE ani_test;
GRANT ALL ON ani_test.* TO 'id001' IDENTIFIED BY 'pwd001';
use ani_test;
CREATE TABLE books (
id int primary key AUTO_INCREMENT NOT NULL,
user_id VARCHAR(20),
hospital_id VARCHAR(20),
hospital_name VARCHAR(20),
date date,
time int,
patient VARCHAR(20),
descript text,
unique(date... | true |
8eed3630a9a459d74f2b1bfbeabeedab203985b1 | SQL | JbBerry/week04_day_02_Homework | /db/marvel_movies.sql | UTF-8 | 2,320 | 3.109375 | 3 | [] | no_license | DROP TABLE movies;
CREATE TABLE movies (
id SERIAL PRIMARY KEY,
title VARCHAR(255),
year INT,
run_time INT,
phase INT
);
INSERT INTO movies (title, year, run_time, phase) VALUES ('Iron Man', 2008, 126, 1);
INSERT INTO movies (title, year, run_time, phase) VALUES ('The Incredible Hulk', 2008, 112, 1);
INSERT INT... | true |
685e968fcc93d6d355c534dcdaac6e166f32daf5 | SQL | coans/boxfoodology | /boxfoodology/db/boxfoodology_v1.0.0.sql | UTF-8 | 4,490 | 3.671875 | 4 | [] | no_license | -- MySQL Workbench Synchronization
-- Generated: 2015-12-16 00:47
-- Model: New Model
-- Version: 1.0
-- Project: Name of the project
-- Author: Milan
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=... | true |
2e0d490a3309a6b579a469e1df7fa49ca8a28855 | SQL | Syarif93/Learn-JWT-with-ExpressJS-and-PostgreSQL | /database.sql | UTF-8 | 374 | 2.65625 | 3 | [] | no_license | CREATE DATABASE jwttutorial;
--set extention
CREATE TABLE users(
user_id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
user_name VARCHAR(255) NOT NULL,
user_email VARCHAR(255) NOT NULL,
user_password VARCHAR(255) NOT NULL
);
--insert fake users
INSERT INTO users (
user_name, user_email, user_passwo... | true |
8c4d914a210058e90fe942364e442cedb6f91242 | SQL | pedrovsn04/scripts_oracle | /sessao7.sql | UTF-8 | 314 | 3.421875 | 3 | [] | no_license | select
substr(s.USERNAME,1,12) "Username",
count(*)
from gv$session s,
gv$process p,
gv$instance x
WHERE s.paddr = p.addr(+)
AND s.USERNAME is not null
-- and p.spid = 28476
--and s.osuser = 'calim3'
--AND s.USERNAME = 'SYSADM'
and s.status ='ACTIVE'
group by substr(s.USERNAME,1,12)
order by 2 desc
/
| true |
844ebddf6d1f1f59a10400af01213eb2d0121c00 | SQL | xiaobbbbbbb/ec-survey | /ec-survey-front/docs/sql/update.sql | UTF-8 | 4,887 | 3.453125 | 3 | [] | no_license | -- 2013-09-03 行车报告 car_report 添加起点和终点位置
ALTER TABLE `car_report` ADD `start_address` CHAR( 200 ) NOT NULL COMMENT '起点位置' AFTER `last_data_id` ,
ADD `end_address` CHAR( 200 ) NOT NULL COMMENT '结束位置' AFTER `start_address`;
-- 2013-09-04
ALTER TABLE `area_info` CHANGE `longitude` `longitude` DOUBLE( 9, 6... | true |
c7c1a7bb244915e10dff41c920db9056f4f1a7f0 | SQL | vitortcmiranda/projetos | /questao4/questao4.sql | UTF-8 | 556 | 3.171875 | 3 | [] | no_license | create procedure receber{
in cpf int(11)
in nome VARCHAR(150)
in n1 DOUBLE
in n2 DOUBLE
in n3 DOUBLE
in n4 DOUBLE
in n5 DOUBLE
in n6 DOUBLE
out media DOUBLE
out resultado VARCHAR(100)
} BEGIN
if n1>n2
media = (n1 + n3 + n6)
else
media = (n2 + n3 + n6)
end if
... | true |
e82f9bd53e802802ed04c3747af30fa84267bd02 | SQL | rhindli/utils | /scloud/sql/prod/TopClientiAPI.sql | UTF-8 | 805 | 3.4375 | 3 | [] | no_license |
select c.Name, Round(count(*)/3, 0) As RequestsNo
from CAPI_UsageLog l
join AD_Client c on l.AD_ClientInclude_ID=c.AD_Client_ID
group by c.Name
order by 2 desc;
select c.Name, ROUND(count(*)/9, 0) As NrCalls
from SWSS_WebService_Log l
JOIN AD_Client c on c.AD_Client_ID = l.AD_Client_ID
where l.created >= to_date('0... | true |
047ecc86ca2136d22e2058367bbecc9124024065 | SQL | Mariohgarza/bamazon | /bamazon.sql | UTF-8 | 751 | 3.03125 | 3 | [] | no_license |
CREATE DATABASE bamazon_db;
CREATE TABLE products (
item_id INT NOT NULL AUTO_INCREMENT,PRIMARY KEY (item_id),
product_name VARCHAR(45) NULL,
department_name VARCHAR(50) NULL,
price INT(50) NULL,
stock_quantity INT (20) NULL
);
SELECT * FROM products;
INSERT INTO products (product_name, department_... | true |
b5192620e1f979bb8f439c3517c034ffe456bb0e | SQL | ronniejoshua/postgresql_data_engineering | /sqlappdev/sql_scripts/create_tree_has_index.sql | UTF-8 | 148 | 3.34375 | 3 | [] | no_license | CREATE INDEX idx_lname_fname
ON customers USING btree
(last_name, first_name);
CREATE INDEX idx_product_name
ON products USING hash
(product_name); | true |
67e1f5b40e6e503808a4604bb1a86d3ea5743b58 | SQL | SayantoRoy/PRATIBHAPOP | /PRATIBHAPOP/TRN/ProductInquiryDetail.sql | UTF-8 | 1,490 | 3.046875 | 3 | [] | no_license | CREATE TABLE [TRN].[ProductInquiryDetail] (
[Id] VARCHAR (10) NOT NULL,
[ProductionProcessGroupId] VARCHAR (10) NOT NULL,
[EntityId] VARCHAR (10) NOT NULL,
[ProductInquiryId] VARCHAR (10) NOT NULL,
[JobWorkApplicable] BIT NOT NULL,
[... | true |
360f7e035a61c6cbad8d31e593fab0c27923dcf5 | SQL | AlexGrasley/Web-Movie-Database | /backend/migrations/showings.up.sql | UTF-8 | 460 | 3.453125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `showings` (
`showing_id` INT(16) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`time` DATETIME NOT NULL,
`movie_id` INT(16) NOT NULL,
`room_id` INT(16) NOT NULL,
CONSTRAINT `movie_id` FOREIGN KEY (`movie_id`) REFERENCES movies (`movie_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.