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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
b150abcadfe8a3a18b171f1285dd78015e6bd1c7 | SQL | RiazHossainFahad/admin_panel | /Backup/test.sql | UTF-8 | 13,572 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 16, 2019 at 11:16 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
edd8a4551ec186964a25336c9e8dda560147dfc1 | SQL | bdmlai/analytics_engineering_marts | /models/Redshift/fds_nplus/aggregate_intermediate/ppv_forecast/intm_ppv_current_ppv.sql | UTF-8 | 840 | 2.75 | 3 | [] | no_license | {{
config({
"materialized": 'ephemeral'
})
}}
SELECT as_on_date,
event_name,
event_date,
event_timestamp AS event_dttm,
event_reporting_type,
event_type,
update_date
FROM {{source('udl_nplus', 'raw_da_weekly_ppv_hourly_comps_new')}}
WHERE update_date = (
SELECT max(update_date)
... | true |
ebcc8d8b74123c9dfff68a92776c2b16a4b356aa | SQL | chenwenbiao/Note | /JAVA/EE/Servlet/ServletDBLog4jExample/src/main/webapp/MySql_Setup.sql | UTF-8 | 925 | 3.34375 | 3 | [] | no_license | /* 1. mysql -u root –p */
/* 2. mysql> source D:\java\Note\JAVA\EE\ServletDBLog4jExample\MySql_Setup.sql */
/* 用--注释报错 */
/* login with root to create user, DB and table and provide grants */
/* The MySQL server is running with the --skip-grant-tables
option so it cannot execute this statement ,通过FLUSH PRIVILEGES解决这个... | true |
841c6a70ca49ae5105186867bfa0dd88390b0450 | SQL | dc-rubiano-rojas/TS-MySQL | /consultas.sql | UTF-8 | 598 | 2.90625 | 3 | [] | no_license | CREATE TABLE heroes(
id INT(11) NOT NULL,
nombre VARCHAR(50) NOT NULL,
poder VARCHAR(50) NOT NULL
);
ALTER TABLE heroes
ADD PRIMARY KEY (id);
ALTER TABLE heroes
MODIFY id INT(11) NOT NULL AUTO_INCREMENT;
INSERT INTO heroes VALUES(default, 'Ironman', 'Dinero e Ingenieria');
INSERT INTO heroes VAL... | true |
4286207a4600597f0c9a8079772fa6f63014bc64 | SQL | kemar1997/CST_171 | /GoldingCST171SP18Exam3/GoldingCST171SP18Exam3.sql | UTF-8 | 1,266 | 3.015625 | 3 | [] | 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 mydb
-- -... | true |
250159b277f24b2b61a29d4c74915fae95c1a10a | SQL | prableen14/SQL-Queries-Practice | /The Report.sql | UTF-8 | 1,633 | 4.53125 | 5 | [] | no_license | /* You are given two tables: Students and Grades. Students contains three columns ID, Name and Marks.
+-------------+----------+
| Column | Type |
+-------------+----------+
| ID | Integer |
| Name | String |
| Marks | Integer |
+-------------+----------+
Grades contains the follow... | true |
da4a7790972df867c3f9a114e5ddb1348a00ec98 | SQL | AnasAzzouzi/_Oracle | /RequeteEx1.sql | UTF-8 | 3,062 | 4.25 | 4 | [] | no_license | --CREATION
--1
create table dept(
deptno number(3),
dname nvarchar2(50) ,
loc nvarchar2(50),
constraint pk1 primary key(deptno),
constraint ck check (dname in('ACCOUNTING','RESEARCH','SALES','OPERATIONS'))
)
--2
INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW-YORK')
INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS')
INSERT... | true |
ce7f8639493624fa78be5eb08d0bde8d3ec7ec37 | SQL | rjimenezpy/dvdrental_dwh | /Scripts/Scripobscargado.sql | UTF-8 | 14,774 | 2.71875 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 10.6 (Ubuntu 10.6-0ubuntu0.18.04.1)
-- Dumped by pg_dump version 10.6 (Ubuntu 10.6-0ubuntu0.18.04.1)
-- Started on 2019-07-23 17:09:58 -04
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encodin... | true |
e67a858c1ab621ca42b13e33e84e769f5220d147 | SQL | vonguyenquan/NMCNPM | /QLSTK.sql | UTF-8 | 1,598 | 3.734375 | 4 | [] | no_license | create database QLSTK
use QLSTK
create table Customers
(
CustomerID char(5) primary key not null,
FullName varchar(30),
Addr varchar(50),
IdNumber char(13)
)
create table Books
(
BookID char(5) primary key not null,
CustomerID char(5),
ServiceType smallint,
StartedDay smalldatetime,
Amount m... | true |
e996656428ef0d5c5e1da22c3836853215e065fe | SQL | seojinkim/bank | /bank/src/main/resources/com/bank/web/sql/member.sql | UTF-8 | 548 | 2.609375 | 3 | [] | no_license | select * from test;
-- 실행 단축키 : ALT + X
SELECT * FROM member;
drop table member;
CREATE TABLE member(
userid VARCHAR2(30) PRIMARY KEY,
name VARCHAR2(30),
password VARCHAR2(30),
addr VARCHAR2(30),
birth NUMBER
);
INSERT INTO member(userid,name,password,addr,birth)
VALUES ('kim','김유신','1','서울',2000)... | true |
30bdeeba4fc96801d145abcab804211fb4db558f | SQL | lulzzz/tellma | /Tellma.Database.Application/rpt/Stored Procedures/rpt.BankAccounts__Unreconciled.sql | UTF-8 | 2,462 | 4.375 | 4 | [
"Apache-2.0"
] | permissive | CREATE PROCEDURE [rpt].[BankAccounts__Unreconciled]
@AsOfDate DATE = NULL
AS
SET @AsOfDate = ISNULL(@AsOfDate, CAST(GETDATE() AS DATE));
WITH BankAccounts AS (
SELECT [Id] FROM dbo.Accounts
WHERE AccountTypeId IN (
SELECT [Id] FROM dbo.AccountTypes
WHERE [Concept] = N'BalancesWithBanks'
)
),
LastExte... | true |
54f6b386fa82bfad14a75ab0bebb0813a9164961 | SQL | biddingLV/BiddingBaltic | /BiddingDatabase/Stored Procedures/BID_GetSubCategoriesWithCount.sql | UTF-8 | 462 | 4.09375 | 4 | [] | no_license | CREATE PROCEDURE BID_GetSubCategoriesWithCount AS
BEGIN
SELECT
typ.AuctionCategoryId AS CategoryId,
typ.TypeId,
typ.Name AS TypeName,
SUM(
CASE
WHEN auct.AuctionTypeId = typ.TypeId AND (auct.EndDate >= CONVERT(date, GETDATE()))
THEN 1
ELSE 0
END) AS TypeTotalCount
FROM Types typ
L... | true |
84d337cea99d13d23ac0f4c4984d9e86802121b6 | SQL | hedg-r52/job4j | /chapter_009/db/scripts/update_001.sql | UTF-8 | 1,654 | 3.4375 | 3 | [
"Apache-2.0"
] | permissive | create table countries(
id serial primary key,
title varchar(50)
);
create table cities(
id serial primary key,
title varchar(50),
countries_id integer references countries(id)
);
insert into countri... | true |
1a0085aad48ed3f88e32cbbfaa8095f68dbcca8f | SQL | valerienierenberg/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/101-not_a_comedy.sql | UTF-8 | 162 | 2.859375 | 3 | [] | no_license | --script that lists all Comedy shows in the database hbtn_0d_tvshows.
SELECT tv_genres.name AS genre;
FROM tv_show_genres;
ORDER BY tv_show_genres.tv_genres ASC;
| true |
b6e5866637344fe35413b5d06727498899af6794 | SQL | IsFilimonov/Interviews | /CodeWars/PostgreSQL/011-Is_n_divisible_by_x_and_y?.sql | UTF-8 | 209 | 2.953125 | 3 | [
"MIT"
] | permissive | SELECT id,
CASE
WHEN mod(n, x) = 0 AND mod(n, y) = 0 THEN TRUE
ELSE FALSE
END AS res
FROM kata;
--BEST PRACTICE
--SELECT id, n % x = 0 AND n % y = 0 AS res
--FROM kata; | true |
2d1228cce370898c457317d4a8e1d437959df98c | SQL | hanbinggary/TestCaseNet | /flask/flaskr/db/schema.sql | UTF-8 | 1,116 | 3.09375 | 3 | [] | no_license | DROP TABLE IF EXISTS TestCase
CREATE TABLE TestCase (
caseId INT PRIMARY KEY AUTO_INCREMENT,
peoType INT NOT NULL,
name CHAR(50) NOT NULL,
level INT NOT NULL,
entry CHAR(50) NOT NULL,
conditionInfo CHAR(50) NOT NULL,
executeInfo CHAR(50) NOT NULL,
... | true |
5cf3cbb5f3630377c2d85da05df066c5ceb84f72 | SQL | rahmat141/eprint | /db/dprint (5).sql | UTF-8 | 12,431 | 2.953125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 02, 2021 at 10:42 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
3e87200cfa5b940592b666fe80b1870eaa97574d | SQL | katiepdx/sql-aggs | /exercise-1/exercise-1.sql | UTF-8 | 371 | 4.28125 | 4 | [] | no_license | -- find the title and count of the top 10 most rented films
-- use COUNT to count each row
-- GROUP BY the film_id
-- ORDER in descending order
-- LIMIT 10
SELECT title,
count(*)
FROM film
INNER JOIN inventory ON film.film_id = inventory.film_id
INNER JOIN rental ON inventory.inventory_id = rental.inventory_id
... | true |
7b27fda7af7d206deb25bb0a57b16f419881e209 | SQL | Gau-Gas/gaugas | /gaugas_db.sql | UTF-8 | 7,638 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 24, 2017 at 07:35 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 7.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
083c3053d3f52b624d4c195d625c02ab2aff91b0 | SQL | kikitux-act/WindowsDynamicMasking | /dynamicmasking.sql | UTF-8 | 202 | 2.640625 | 3 | [
"MIT"
] | permissive | use masksmalldb
ALTER TABLE dbo.Customer
ALTER COLUMN LastName ADD MASKED WITH (FUNCTION = 'partial(2,"XXX",0)');
CREATE USER [devlogin] FOR LOGIN [devlogin]
GRANT SELECT ON dbo.customer TO devlogin;
| true |
746b5cb8d0d0fc9ddca397996e39dec800d65d46 | SQL | ksaseendran/Synthea-OMOP-on-Synapse | /ETL Scripts/Load/120. Load drug_exposure.sql | UTF-8 | 4,537 | 3.5 | 4 | [
"Apache-2.0"
] | permissive | INSERT INTO [omop].DRUG_EXPOSURE
(
DRUG_EXPOSURE_ID,
PERSON_ID,
DRUG_CONCEPT_ID,
DRUG_EXPOSURE_START_DATE,
DRUG_EXPOSURE_START_DATETIME,
DRUG_EXPOSURE_END_DATE,
DRUG_EXPOSURE_END_DATETIME,
VERBATIM_END_DATE,
DRUG_TYPE_CONCEPT_ID,
STOP_REASON,
REFILLS,
QUANTITY,
DAYS_S... | true |
db3cc44c6ba161a9166740d021deb8ec6e416b30 | SQL | VasylStep/june-2020 | /MySQL/lection1,sql | UTF-8 | 1,580 | 3.546875 | 4 | [] | no_license | INSERT INTO doctors (age) VALUES (34);
SELECT * FROM students;
SELECT name, age FROM students;
SELECT * FROM students WHERE age = 15;
SELECT * FROM students WHERE name = 'romAn'
SELECT * FROM students WHERE name LIKE '%n'
SELECT * FROM students WHERE name LIKE '%n%';
SELECT * FROM students WHERE name LIKE '___a%... | true |
307791aa6a1e7f563f662733d100fae144b21fc1 | SQL | cuevas097/BD_SQL_Proyecto | /s-13-p_tabla_temporal.sql | UTF-8 | 2,265 | 3.5625 | 4 | [] | no_license | --Procedimiento que ingresa valores en una tabla temporal
--y regresa el numero de registros agregados
create or replace procedure p_tabla_temporal(
p_num_registros out number
)
is
v_empleado_temp_id empleado_temp.empleado_temp_id%type;
v_nombre empleado_temp.nombre%type;
v_ap_paterno empleado_temp.ap_paterno%type;
v... | true |
0142c55205a7dfdcdd6c7ff55f1d45cd521e790b | SQL | radomirkovacevic/php-registration_system | /sql/users.sql | UTF-8 | 606 | 3.140625 | 3 | [] | no_license | CREATE TABLE `users` (
`id` int NOT NULL AUTO_INCREMENT,
`first_name` varchar(50) NOT NULL,
`last_name` varchar(50) NOT NULL,
`user_mail` varchar(100) NOT NULL,
`user_password` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`user_validated` int NOT NULL DEFAULT '0',
`date` timestamp NOT... | true |
e2d896d47ee54f5b52789abfd583cf0abb975ae5 | SQL | ITISummer/DreamTreeSharer | /MySQL/dream_tree_sharer.sql | UTF-8 | 14,131 | 3.203125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80012
Source Host : localhost:3306
Source Schema : dream_tree_sharer
Target Server Type : MySQL
Target Server Version : 80012
File Encoding : 65001
Date: 11/... | true |
bce6ad66cc67da9d5c24eb3388b867a9c411a189 | SQL | pozys/PHP2 | /db.sql | UTF-8 | 8,447 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3308
-- Время создания: Мар 21 2020 г., 09:34
-- Версия сервера: 10.3.13-MariaDB-log
-- Версия PHP: 7.2.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 S... | true |
bc7f7105cc827b02ba1733ea89adca2de7c61d95 | SQL | anderson-81/my-studies | /oracle/sql/27_group_by.sql | UTF-8 | 389 | 3.25 | 3 | [] | no_license | -- adicionando uma coluna UF:
-- alter table person add uf char(2);
-- Atualizar os registros com a inclusão de UF.
-- Quantidade de pessoas separados por UF:
select uf as "Unidade Federativa", count(*) as "Quantidade de pessoas" from person group by uf order by uf ASC;
select gender as "Sexo", count(*) as "Quanti... | true |
5a593d99788635b73a7a003d97375277796d449a | SQL | swarm64/tpc-toolkit | /benchmarks/tpch/schemas/sdb_fact_part/foreign-keys.sql | UTF-8 | 600 | 2.84375 | 3 | [
"MIT"
] | permissive | ALTER TABLE ONLY customer
ADD CONSTRAINT customer_nation_fk FOREIGN KEY (c_nationkey) REFERENCES nation(n_nationkey);
ALTER TABLE ONLY nation
ADD CONSTRAINT nation_region_fk FOREIGN KEY (n_regionkey) REFERENCES region(r_regionkey);
ALTER TABLE ONLY partsupp
ADD CONSTRAINT partsupp_part_fk FOREIGN KEY (ps_pa... | true |
b754e5428f07c2b7b6fd7fae1d4d7a17c8bbcd05 | SQL | 2374142287/game_enchcity_javascript | /Archive/Proc_GuestGenerate.sql | UTF-8 | 3,775 | 3.546875 | 4 | [] | no_license | DROP procedure IF EXISTS `Proc_GuestGenerate`;
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `Proc_GuestGenerate`(IN p_userid INT)
BEGIN
/*
1. 只有用户有食品或用户在线时,才进行客人生成及消费计算
2. 在生成客人时,未进店的客人将被删除。
3. 客人出店后将删除记录
4. 客人进店间隔 = 3600 / 每小时的客流量
5. 客人进店的最小间隔为3秒,因此以3秒为间隔计算进店、消费、出店。
6. 进店顺序随机
7. 在购买的时候生成购买哪两个食品(流浪汉只有酒水)
... | true |
9f221ec70d4c5549a38d7c0116783368fa7f5470 | SQL | RLflash/showMe | /show_me.sql | UTF-8 | 2,168 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2018-11-12 10:55:01
-- 服务器版本: 10.1.19-MariaDB
-- PHP Version: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40... | true |
6f26a93c906c3cafbb364813f37aba8a1e2d6b10 | SQL | Qasmi2/HAPV2-Completed- | /protalv2.sql | UTF-8 | 12,740 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 03, 2017 at 07:20 AM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
2e1b11383691a725cab5eb8eed976484af26cc11 | SQL | muntaza/Open_Persediaan | /sql1_persediaan/daftar_pengeluaran_barang_sql/daftar_pengeluaran_bpbd.sql | UTF-8 | 321 | 2.59375 | 3 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | DROP VIEW IF EXISTS view_daftar_pengeluaran_bpbd;
CREATE VIEW view_daftar_pengeluaran_bpbd AS
SELECT
*
FROM
view_daftar_pengeluaran_kabupaten
WHERE
1 = 1 AND
id_skpd = 39;
GRANT ALL PRIVILEGES ON view_daftar_pengeluaran_bpbd TO lap_bpbd;
REVOKE INSERT, UPDATE, DELETE ON view_daftar_pengeluaran_bpbd FROM lap_bpbd;... | true |
6bb2fad6b17166b3e8ddebdfd30e82bdff9b7008 | SQL | DragonicK/SimpleLogin | /laravel.sql | UTF-8 | 2,664 | 3.203125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : Connection
Source Server Type : MySQL
Source Server Version : 80025
Source Host : localhost:3306
Source Schema : laravel
Target Server Type : MySQL
Target Server Version : 80025
File Encoding : 65001
Date: 20/08/2021 2... | true |
a5d54a0318c327ca24fe2d01d741b63c89391214 | SQL | omega/easycms2 | /db/upgrade/EasyCMS2-Schema-Base-0.16-0.17-PostgreSQL.sql | UTF-8 | 1,116 | 3.03125 | 3 | [] | no_license | -- Convert schema '/Users/andremar/Projects/easycms2/db/upgrade/EasyCMS2-Schema::Base-0.16-PostgreSQL.sql' to '/Users/andremar/Projects/easycms2/db/upgrade/EasyCMS2-Schema::Base-0.17-PostgreSQL.sql':
-- Target database PostgreSQL is untested/unsupported!!!
--
-- Table: snippet02
--
-- Comments:
-- Table: snippet
-- D... | true |
b926af0c4086384422f4b0fa4e7a6f84e0ad96e8 | SQL | NedHerrera/Cassandra-DEMO | /DML/queryx.cql | UTF-8 | 1,447 | 3.890625 | 4 | [] | no_license | use Cassandra_LaLiga;
-- 1
-- Partidos de X Temporada donde Y equipo ha jugado como local
-- Respuesta:
-- select * from match_local where season = 'XXXX-YYYY' and local_team = 'ZZZZ';
select *
from match_local
where season = '1979-1980'
and local_team = 'Betis'
;
-- 2
-- Partidos de X Temporada donde Y equipo ha ... | true |
e3055acfed8d6623bb42d9ea566fa312a4c8765c | SQL | LabKey/wnprc-modules | /WNPRC_EHR/resources/queries/study/demographicsMHC.sql | UTF-8 | 757 | 3.53125 | 4 | [
"Apache-2.0"
] | permissive | /*
* Copyright (c) 2010-2014 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT * FROM (
SELECT MAX(A01) AS A01, MAX(A02) AS A02, MAX(A11) AS A11, MAX(B08) AS B08, MAX(B17) AS B17, COUNT(*) AS totalAllelesTyped, Id
FROM
(
... | true |
8e71d5fd55345525c5b7fb944d1d7995c7a8653d | SQL | data2health/COVID_19TagLib | /src/non-packaged-resources/gkg.sql | UTF-8 | 5,810 | 3.78125 | 4 | [] | no_license | CREATE TABLE gkg.raw (
date integer,
numarts integer,
counts text,
themes text,
locations text,
persons text,
organizations text,
tone text,
cameoeventids text,
sources text,
sourceurls text
);
create index raw_date_int on raw(date);
create table gkg_staging (
id serial pr... | true |
594f63bd16f430912099a4018f8062cd36062995 | SQL | OPERANDOH2020/op-core | /op-core-bigdataanalytics/eu.operando.core.bda.server/src/main/sql/creation.sql | UTF-8 | 3,866 | 3.0625 | 3 | [
"Apache-2.0"
] | permissive | -- MySQL dump 10.13 Distrib 5.6.17, for Win32 (x86)
--
-- Host: localhost Database: operando_bigdataanalyticsdb
-- ------------------------------------------------------
-- Server version 5.6.17
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARA... | true |
1fd900128d2d3836a591ff4f374e92c5b8f67659 | SQL | ashre1/MovieTicketingSystem | /movie.sql | UTF-8 | 15,508 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 10, 2017 at 08:39 AM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
53ef69e056e4bbdeba24625145c3b05326bdbf7c | SQL | WindhoverLabs/airliner | /apps/hs/test_and_ground/asist/prc/template/template_hs_emt3.prc | UTF-8 | 3,635 | 2.8125 | 3 | [
"NASA-1.3"
] | permissive | PROC $sc_$cpu_hs_emt3
;*******************************************************************************
; Test Name: hs_emt3
; Test Level: Build Verification
; Test Type: Functional
;
; Test Description
; The purpose of this procedure is to generate an Event Monitoring Table
; that contains an entry for t... | true |
dae96e7af4a69fb73fe13d97f37dcc8e5b18d3e8 | SQL | ceccs18c62/CS333 | /lab3_20_11_2020.sql | UTF-8 | 1,020 | 4.15625 | 4 | [] | no_license | -- create a table Employee
CREATE TABLE Employee (
empID int PRIMARY KEY NOT NULL,
name varchar(20) NOT NULL,
dop date
);
INSERT INTO Employee
VALUES(1,"raj","20\11\1995");
INSERT INTO Employee
VALUES(2,"sam","25\01\1990");
INSERT INTO Employee
VALUES(3,"ram","10\08\1995");
-- 1 create a table Employeedetails
CR... | true |
7049906f5332c7b666dd6a2bcd9778036621ae9e | SQL | FranciscoMan/TestDB2 | /PRD/Tables/K_WORK_ORDER_CARTON.sql | UTF-8 | 1,934 | 2.921875 | 3 | [] | no_license | CREATE TABLE [PRD].[K_WORK_ORDER_CARTON] (
[ID_WO_CARTON] INT IDENTITY (1, 1) NOT NULL,
[ID_CARTON] INT NOT NULL,
[KY_CARTON] NVARCHAR (50) NOT NULL,
[NM_CARTON] NVARCHAR (100) NULL,
[DS_CARTON] NVARCHAR (1000) NULL,
... | true |
7c2b8003d79868baad54d24c10215106aef30be0 | SQL | METS-Programme/ugandaemr-openmrs-server | /sql.sql | UTF-8 | 16,853 | 3.21875 | 3 | [] | no_license | DROP TABLE IF EXISTS facility;
CREATE TABLE `facility` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`uuid` CHAR(38) NOT NULL,
`name` TEXT,
PRIMARY KEY (`id`)
)ENGINE = InnoDB DEFAULT CHARSET = utf8;
DROP TABLE IF EXISTS encounter;
CREATE TABLE `encounter` (
`id`... | true |
a680ebe7d59550605b674f7307a6a5abb876136c | SQL | eamaralp/SQL-Matera | /funcGolJogador.sql | UTF-8 | 356 | 2.890625 | 3 | [] | no_license | CREATE OR REPLACE FUNCTION golsPorJogador
(
pnIdJogador IN NUMBER
) RETURN NUMBER AS
pnNumeroGols NUMBER;
BEGIN
SELECT COUNT(*)
INTO pnNumeroGols
FROM gol,
jogo_jogador JJG
WHERE gol.id_jogo_jogador = JJG.id_jogo_jogador
AND JJG.id_jogador = pnIdJogado... | true |
028d5db319e28413e696dd14f15127b8ba04d7d9 | SQL | sebaspala02/taller1ElectivaII | /resource/db/script.sql | UTF-8 | 10,169 | 3 | 3 | [
"MIT"
] | permissive | -- MySQL Script generated by MySQL Workbench
-- Tue Oct 22 09:19:34 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='TR... | true |
b0bb4524e4785f9a05e2759c2aa1d8d90765d35c | SQL | radtek/abs3 | /sql/mmfo/bars/View/ra_kwt_2924.sql | UTF-8 | 1,233 | 3.359375 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/View/RA_KWT_2924.sql =========*** Run *** ==
PROMPT =====================================================================================
PROMPT *** Create view RA_K... | true |
01c69376ca6512883329d05885ac4a78d47d53df | SQL | pavgra/WebPlatform | /auth-svr/src/main/resources/db/migration/V20190217213411__initial.sql | UTF-8 | 360 | 3.84375 | 4 | [] | no_license | CREATE TABLE "user" (
id SERIAL PRIMARY KEY,
username VARCHAR(255) UNIQUE,
created_at TIMESTAMP DEFAULT now() NOT NULL
);
CREATE TABLE role (
id SERIAL PRIMARY KEY,
name VARCHAR(255) UNIQUE,
created_at TIMESTAMP DEFAULT now() NOT NULL
);
CREATE TABLE user_role (
user_id INTEGER REFERENCES "user" (id),
... | true |
5588c639f14f070b49f6fd392338567dbce58e5a | SQL | OlhaZSholohon/LV468 | /Tables/dbo.FactDeliveries.sql | UTF-8 | 266 | 2.578125 | 3 | [] | no_license | IF OBJECT_ID('dbo.FactDeliveries') IS NOT NULL
DROP TABLE dbo.FactDeliveries
CREATE TABLE FactDeliveries(
DateKey INT NOT NULL
, DeliveryDetailID INT NOT NULL
, ProductID INT NOT NULL
, LocationID INT NOT NULL
, ClientID INT NOT NULL
, SumWeight DECIMAL
) | true |
81bc5f4d0c443562a90c05d20cf67045a53fff14 | SQL | sharonshlee/BootcampX | /1_queries/total_students_in_cohort.sql | UTF-8 | 133 | 3.25 | 3 | [] | no_license | SELECT count(id)
FROM students
WHERE cohort_id IN (1, 2, 3);
-- SELECT COUNT(*)
-- FROM students
-- WHERE cohort_id BETWEEN 1 AND 3; | true |
ad3180fa0308a8510e183dc4337b5262c25824f0 | SQL | Miamiohlibs/sql | /gobi-batch-cat-from-brief-bib.sql | UTF-8 | 682 | 3.671875 | 4 | [] | no_license | --towards a query that might allow automated batch Connexion query
--based on the brief bib ISBN for ebooks (work with Jennifer)
--primarily looks for uncataloged ebooks in the past week
SELECT
--count(*)
*
FROM
sierra_view.record_metadata AS m
JOIN
sierra_view.bib_record AS b --need to check bib rec for more info
O... | true |
b91531a384c4cc99657864d39063390dae66a3ff | SQL | caoyunhao/spring-boot-petshop-admin | /sql/commodity_store.sql | UTF-8 | 777 | 2.6875 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50719
Source Host : localhost
Source Database : petshop
Target Server Type : MySQL
Target Server Version : 50719
File Encoding : utf-8
Date: 04/15/2018 13:46:1... | true |
245b65132f2d83ddcfb100b2553219e3f6b939d1 | SQL | 5362396/Bazy-Danych | /sql6.sql | UTF-8 | 2,179 | 3.59375 | 4 | [] | no_license | Lekcja 6 - NIE BĘDZIE NA KOLOSIE
SHOW triggers;
SHOW CREATE trigger nazwa;
SHOW PROCEDURE STATUS WHERE db = 'nazwa_bazy';
SHOW FUNCTION STATUS WHERE db = 'nazwa_bazy';
DROP FUNCTION nazwa;
# wyjaśnienie pojęcia [NOT] DETERMINISTIC
Funkcja deterministyczna to taka, która dla tych samych danych wejściowych zwrac... | true |
d0d97d5f001039fc523c5b96d6bb0771afbc64ab | SQL | deydrums/master-php | /aprendiendo-sql/09-ejercicios/ejercicio16.sql | UTF-8 | 219 | 3.53125 | 4 | [] | no_license | /*
16. Obtener listado de clientes atendidos por el vendedor "David Lopez"
*/
SELECT c.nombre, CONCAT(v.nombre, ' ', v.apellidos) AS 'Vendedor' FROM clientes c
INNER JOIN vendedores v ON c.vendedor_id = v.id
WHERE v.id = 1; | true |
44560f4d8e2d56ea7bca423b4b01349a9909b5fe | SQL | jcarrizalez/events-sockert | /database_query.sql | UTF-8 | 515 | 3.65625 | 4 | [] | no_license | --Muestra los Eventos registrados
SELECT d.name as date, o.name as origin, c.name as country, ad.name as address, s.name as session, et.name as event, a.name as agent,e.data
FROM events e, origins o, events_type et, dates d, countries c, agents as a, address ad, sessions s
WHERE e.origin_id=o.id
AND e.event_type_id=et.... | true |
88c867565dc2a8264dd88807297cad92854aaf3b | SQL | lanciamo/Databases | /Lesson07/fulldb-02-09-2019-18-07-beta.sql | UTF-8 | 69,431 | 2.828125 | 3 | [] | no_license | -- Generation time: Mon, 02 Sep 2019 18:07:53 +0000
-- Host: mysql.hostinger.ro
-- DB name: u574849695_25
/*!40030 SET NAMES UTF8 */;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_C... | true |
1ea1c8ad80065c9243a6a4a78b3f23b9eefa7f1b | SQL | dutinfo-projets3/basededonnee | /testsSite.sql | ISO-8859-1 | 1,767 | 4.15625 | 4 | [] | no_license | --Selectionner la liste des lve dans un groupe (idGroupe= 1)
SELECT * FROM ETUDIANT
WHERE idPersonne IN (SELECT idPersonne FROM APPARTIENT
WHERE idGroupe = 1)
ORDER BY nom, prenom ;
--Lister les notes d'un lve (idPersonne = 2) pour une anne (anneeCourante),
--classes par matire
SELECT n.va... | true |
eb99e30d81e3f61b35ac3cf28d2814f4c8cbe845 | SQL | ahiaplee/REST_API | /schema.sql | UTF-8 | 370 | 2.8125 | 3 | [] | no_license | CREATE SCHEMA IF NOT EXISTS rest_api;
CREATE TABLE IF NOT EXISTS rest_api.files (
id SERIAL,
filename text NOT NULL,
filesize integer NOT NULL,
filepath text NOT NULL,
sensitivity_score integer,
last_updated timestamp without time zone,
PRIMARY KEY(id)
);
CREATE TABLE IF NOT EXISTS rest_ap... | true |
818dc5a1514937803cd4fb3f85c7ae40a55aa907 | SQL | JRHattan/Pewlett-Hackard-Analysis | /Data/Employee_Database_challenge.sql | UTF-8 | 2,730 | 4.34375 | 4 | [] | no_license | -- Creating tables for PH-EmployeeDB
CREATE TABLE departments (
dept_no VARCHAR(4) NOT NULL,
dept_name VARCHAR(40) NOT NULL,
PRIMARY KEY (dept_no),
UNIQUE (dept_name)
);
CREATE TABLE employees (
emp_no INT NOT NULL,
birth_date DATE NOT NULL,
first_name VARCHAR NOT NULL,
last_nam... | true |
4ba6ca988c6428484fe84858c65defce574f4b12 | SQL | simca114/ontracdrivers | /mysql_tables/stops.sql | UTF-8 | 2,217 | 2.921875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.5.35, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: ontrac_db
-- ------------------------------------------------------
-- Server version 5.5.35-1ubuntu1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACT... | true |
317a63c74bc8f62f1fb4306f5b241a1c4c462798 | SQL | htmlacademy-nodejs/58484-buy-and-sell-3 | /queries.sql | UTF-8 | 4,775 | 4.34375 | 4 | [] | no_license | -- Получить список всех категорий (идентификатор, наименование категории);
SELECT id, name FROM categories;
-- Получить список категорий для которых создано минимум одно объявление (идентификатор, наименование категории);
SELECT id, name
FROM categories
JOIN offer_categories ON categories.id = offer_categories.ca... | true |
5398ae51faa4c3e9733b5f9632f4cf9aec4e1c53 | SQL | MariVasil/Coursework_Database | /Курсовая_БД/Group_by.sql | UTF-8 | 864 | 3.703125 | 4 | [] | no_license | /* Данная группировка отображает какое количество входящих транзакций было
осуществлено по каждому платежному методу за конкретный период (в данном случае - прошлый год).
Это полезно, например, для аналитики, сбора метрик и составления оценки.
Можно, например, передать результаты этой выборки в какую-нибудь аналитическ... | true |
48bcc9cd29e53930619290e8d1d6ebd25745b430 | SQL | ZEEstranger/HackerRank | /SQL/Advanced Select/Binary Tree Nodes.sql | UTF-8 | 196 | 3.453125 | 3 | [] | no_license | SELECT
DISTINCT A.N,
CASE
WHEN B.N IS NULL THEN 'Leaf'
WHEN A.P IS NULL THEN 'Root'
ELSE 'Inner'
END AS TES
FROM BST AS A
LEFT JOIN BST AS B ON
B.P = A.N | true |
0ff38e1b0f37d5d97e941605862c6f5da0027d2f | SQL | Huangshihaoo/specialColumn | /server/sql/article.sql | UTF-8 | 1,249 | 3.28125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : 我的数据库
Source Server Type : MySQL
Source Server Version : 50553
Source Host : localhost:3306
Source Schema : essayserver
Target Server Type : MySQL
Target Server Version : 50553
File Encoding : 65001
Date: 05/05/2021 20... | true |
da688200a70db601b3e5f760dbf8f09a013e6d73 | SQL | derricknoutais/pizolub | /inserts2.sql | UTF-8 | 1,640 | 2.78125 | 3 | [] | no_license | INSERT INTO fournisseurs
(id,nom)
VALUES
(1, 'ENGEN S.A.'),
(2, 'INDEPENDANT/ORONITE'),
(3, 'LIBYA OIL '),
(4, 'MOBIL'),
(5, 'PETRO GABON'),
(6, 'SHELL'),
(7, 'TOTAL'),
(8, 'TOTAL LUBS');
INSERT INTO clients
(id,nom)
VALUES
(1, 'ENGEN'),
(2, 'OILIBYA'),
(3, 'PETRO GABON'),
(4, 'TOTAL'),
(5, 'PIZO');
IN... | true |
5ede8b289a94d17566d0c13f7f7674a21a4aa884 | SQL | sqlfluff/sqlfluff | /test/fixtures/dialects/ansi/select_nested_join.sql | UTF-8 | 1,898 | 3.984375 | 4 | [
"MIT"
] | permissive | -- query with no brackets
select
orders.order_id AS order_id,
customers.email AS email
from
orders
join customers on(
(
customers.customer_id = orders.customer_id
)
)
where
(customers.email = 'sample@gmail.com')
group by
orders.order_id,
customers.email
order... | true |
60484a715dfbcd3657ecf89c592fb7c2ada12ac7 | SQL | biancaannoscia/javaspring | /spring-mvc_1/target/classes/META-INF/sql/schema.sql | UTF-8 | 321 | 2.953125 | 3 | [] | no_license | CREATE TABLE BOOK (
ID INT(11) NOT NULL AUTO_INCREMENT
, CATEGORY_NAME VARCHAR(100) NOT NULL
, ISBN VARCHAR(10) NOT NULL
, TITLE VARCHAR(200) NOT NULL
, PUBLISHER VARCHAR(100) NOT NULL
, PRICE DECIMAL(4,2) NOT NULL
, UNIQUE UQ_BOOK (CATEGORY_NAME, TITLE)
, PRIMARY KEY (ID)
);
... | true |
9427faf24cfbc19689a42f55c83a1aba2f11185f | SQL | jimmychang851129/Database_Final | /mysql/sql-scripts/InsertTable.sql | UTF-8 | 23,173 | 2.546875 | 3 | [] | no_license | -- Studio
Insert into Studio(SdName,FoundDate,Location,President) Values('ufotable','2000','杉並区本天沼','近藤光');
Insert into Studio(SdName,FoundDate,Location,President) Values('TROYCA','2013','東京都練馬区石神井町','長野敏之');
Insert into Studio(SdName,FoundDate,President) Values('TYPE-MOON','2003','奈須蘑菇');
Insert into Studio(SdName,Loc... | true |
37400805f69d24b8b3f9250f3d3481550ec0313b | SQL | jobchoi/study_dbms | /Test_0826.sql | UHC | 4,571 | 4.53125 | 5 | [] | no_license | 1. ְ(), Ѿ, ձ ȸ.
ձ ݿøϿ ǥ
select MAX(salary), min(salary), round(avg(salary),0)
from employees;
2. ְ, Ǵ ľϰ Ѵ.
ְ ȸϽÿ
3. ľϰ Ѵ.
ȸϽÿ.
select distinct m.manager_id, e.employee_id
from employees e, employees m
where m.manager_id = e.employee_id(+);
4. μڵ 20,40,50 μ ϴ ִ ľϰ Ѵ.
μڵ 20,40,50 μ鿡 ڵ ȸ
sele... | true |
0d7d49b6302e2832a4a9ca9b670ae778f5345e05 | SQL | alifahfathonah/Bimbingan-Belajar-Online | /database/app_users.sql | UTF-8 | 1,847 | 3.0625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Oct 16, 2019 at 09:43 PM
-- Server version: 5.7.27-log
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
959a6433f84ee0938bfee3192ee241482fb40a5f | SQL | mvm-sp/API_Scallo | /rest/sql/procedimentos_WhatsOUT.sql | UTF-8 | 361 | 3.265625 | 3 | [] | no_license | SELECT row_to_json(x) AS procedimentos
FROM (SELECT PRD."IdProcedimento" AS Id,
PRD."NmApelido" AS Nome,
CFG."VlConfiguracao" AS orientacoes_e_preparo
FROM "T0000_Configuracao" CFG INNER JOIN "T0199_Procedimento" PRD ON CFG."IdRegistro" = PRD."IdProcedimento"
AND PRD."IdProcedimento" = '__procedimento'
A... | true |
09c592391bf96d6b06818b48196ac8ed0fddfdb8 | SQL | rbrandon87/DBST663_GroupProject | /Deliverable Folders/DB/DB_2_Data.sql | WINDOWS-1250 | 964 | 2.671875 | 3 | [] | no_license | ---Enter the following DML statement on Hospital_DB_1 to insert data into Hospital_DB_2.
INSERT INTO Patients@Linker_1_2 (Patient_ID,First_Name,Last_Name,DOB,Phone_Num,Gender,Address,Zip_Code,Database_Name)
VALUES ('5', 'Bob', 'Lee', '2001-8-12', '698399', 'M', 'Street 14', '42','hospital_db_2');
INSERT INTO Patient... | true |
7a7bc30a8f17d0f1c19b3c55cece856442026e33 | SQL | haruu19/DBStudy | /day01/select문 예제.sql | UTF-8 | 3,673 | 4.6875 | 5 | [] | no_license | -- 1) emp 테이블 정보를 확인하세요.
desc emp;
-- 2-1) 이름이 K로 시작하는 사원의 사원번호, 이름, 입사일, 급여를 검색
select empno, ename, hiredate, sal from emp where ename like "K%";
-- 2-2) 이름이 K로 시작하는 사원 중 이름이 3자인 사원의 사원번호, 이름, 입사일, 급여를 검색
select empno, ename, hiredate, sal from emp where ename like "K__";
-- 2-3) 이름의 두번 째 글자가 M
select empno, ename, ... | true |
3748595ef159357bf3bcda92bf95b4f60e39cac2 | SQL | dengyouquan/JavaTest4 | /docker/mysql/privileges.sql | UTF-8 | 400 | 2.875 | 3 | [] | no_license | use mysql;
select host, user from user;
-- 因为mysql版本是5.7,因此新建用户为如下命令:
create user admin identified by '123456';
-- 将docker_mysql数据库的权限授权给创建的docker用户,密码为123456:
grant all on *.* to admin@'localhost' identified by '123456' with grant option;
-- 这一条命令一定要有:
flush privileges;
select host, user from user; | true |
ee248ca5c21093b1975336a3ec96de55dc9807cf | SQL | nikki4944/Hewlett_Packard_Analysis | /Queries/Employee_Database_challenge.sql | UTF-8 | 1,104 | 4.34375 | 4 | [] | no_license | Select e.emp_no,
e.first_name,
e.last_name,
t.title,
t.from_date,
t.to_date
into retirement_titles
from employees as e
left join titles as t
on e.emp_no=t.emp_no
where (e.birth_date between '1952-01-01' AND '1955-12-31')
order by e.emp_no;
select * from retirement_titles;
-- Use Dictinct with Orderby to remove... | true |
d32ad13db29103755806ef6b2c754f20cc85ad0f | SQL | steven-maasch/bachelor-thesis-code | /docs/db/query.sql | UTF-8 | 2,906 | 3.34375 | 3 | [] | no_license | # Erstellung der View released_beacon
CREATE VIEW p5809_5648.released_beacon
AS SELECT b.fs_id, b.beacon_id, b.uuid, b.major, b.minor
FROM p5809_5648.beacon b
WHERE b.fs_release_to = 9223372036854775807;
# Erstellung der View released_facility
CREATE VIEW p2761_2742.released_facility
AS SELECT facility.fs_id, fa... | true |
b0538e5ab34da5524e091c0c536a8160fa6a5356 | SQL | geiner/TiendAndreeDS | /src/main/resources/scripts/compras.sql | UTF-8 | 812 | 3.078125 | 3 | [] | no_license | CREATE TABLE proveedor
(
codigo INTEGER NOT NULL ,
nombre VARCHAR2 (100) ,
direccion VARCHAR2 (100) ,
telefono INTEGER ,
email varchar2(100),
descripcion varchar2(100),
CONSTRAINT proveedor_pk PRIMARY KEY (codigo)
);
CREATE SEQUENCE proveedor_seq
MINVALUE 400
MAXVALUE 9... | true |
0e6969c4fae4da8672d2327063c3430f6b958841 | SQL | Kismawati07/Input1 | /input/formulir1.sql | UTF-8 | 1,195 | 2.546875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 2.10.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Waktu pembuatan: 12. Juli 2017 jam 15:54
-- Versi Server: 5.0.41
-- Versi PHP: 5.2.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `db_input1`
--
-- --------------------------------------------------------
--
... | true |
dcf4d7d43035e51dace921fae0caf2f2ee2ce17e | SQL | OITDatabaseGithub/LabQueries | /Lab1/Scripts/Question1.sql | UTF-8 | 213 | 3.15625 | 3 | [] | no_license | select
year,
month,
round( avg( arrdelayminutes )::numeric, 2 ) as avg_arrive_delay
from airline.on_time_performance
where year = 2005 OR year = 2006
group by year, month
order by avg_arrive_delay desc
limit 5
| true |
10e89a2f325cd1a0cb71fcdc037d20718c0a82e7 | SQL | m000/hotcrp | /Code/updateschema.sql | UTF-8 | 3,781 | 3.484375 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT",
"BSD-3-Clause"
] | permissive | -- This file contains the SQL statements required to update from one version
-- of HotCRP to the next.
--
-- HotCRP updates are designed so that new code can run transparently with an
-- old database. This lets you easily fix bugs in old features. However, if
-- you want to enable a new feature, you will need to upda... | true |
daf9c5b091f6bf7cfa0508cc7bbaccc6e0d9690b | SQL | CUBRID/cubrid-testcases | /sql/_12_mysql_compatibility/_11_code_coverage/_01_operators/_04_other_operators/cases/_001_nullsafe_op.sql | UTF-8 | 1,082 | 3.359375 | 3 | [
"BSD-3-Clause"
] | permissive | CREATE TABLE tbl (c_int int, c_str varchar(10));
INSERT INTO tbl VALUES (1, NULL);
INSERT INTO tbl VALUES (NULL, '1');
SELECT * from tbl where c_int <=> 1;
SELECT * from tbl where c_int <=> '1';
SELECT * from tbl where c_int <=> NULL;
SELECT * from tbl where 1 <=> c_int;
SELECT * from tbl where '1' <=> c_int;
SELECT ... | true |
61f48ffb72a4ad72e8b5267c3244233329b7e76a | SQL | tomsi113/chrenka-maturita | /complete-blog-php (1).sql | UTF-8 | 6,014 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Hostiteľ: 127.0.0.1
-- Čas generovania: Ne 16.Dec 2018, 17:55
-- Verzia serveru: 10.1.36-MariaDB
-- Verzia PHP: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
cb329160460deb3f46837579a5fdf9f10e84aa1d | SQL | IlayG01/CS50_Solutions | /7.SQL/movies/9.sql | UTF-8 | 148 | 3.28125 | 3 | [] | no_license | SELECT name FROM movies
JOIN stars ON movies.id = stars.movie_id
JOIN people ON stars.person_id = people.id
WHERE movies.year = 2004
ORDER BY birth; | true |
711ec6f7ef12fae383fbda11bfbd279bd78a0abb | SQL | tkmarsten/team8-tcss450-app | /SetupTestMessages.sql | UTF-8 | 9,027 | 3.28125 | 3 | [] | no_license | --Remove all members from all chats
DELETE FROM ChatMembers;
--Remove all messages from all chats
DELETE FROM Messages;
--Remove all chats
DELETE FROM Chats;
--Remove the user test1
DELETE FROM Members
WHERE Email='test1@test.edu';
--Add the User test1 (password is: Testtest1!)
INSERT INTO
Members(FirstName,... | true |
839e6418ba7a3ef0aea8cb130e620be5072ec40a | SQL | fendaq/open-capacity-platform | /open-db-core/src/main/resources/db.sql | UTF-8 | 4,060 | 3.484375 | 3 | [
"MIT"
] | permissive | create table sys_dept(
dept_id VARCHAR2 (255) NOT NULL primary key,
dept_name VARCHAR2 (255) NOT NULL,
parent_dept_id VARCHAR2 (255),
parent_dept_ids VARCHAR2 (255),
sortstring VARCHAR2 (255),
if_valid CHAR (1) ,
remark VARCHAR2 (255),
operator varchar2(255),
ope... | true |
7932756681aa09e2768db9244dd08ad72e07502b | SQL | rnama22/amzorbit | /sqldm/dm_amzuser.sql | UTF-8 | 7,485 | 3.703125 | 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 amzorb... | true |
393307a4edf5ef8f7ea2b7f6ec4c80f5cf7eda46 | SQL | carlos-plata/projects | /java/reviews/src/main/resources/db/migration/V1__Create_products_table.sql | UTF-8 | 165 | 2.625 | 3 | [] | no_license | create table if not exists products(
product_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(40) NOT NULL,
description VARCHAR(100) NOT NULL
); | true |
6891f3312483adb8ba22b73a08c7d252b2b4dd5c | SQL | osvaldov518/identificacion | /identificacion/database/generar_tendencia.sql | UTF-8 | 2,022 | 3.640625 | 4 | [] | no_license | CREATE DEFINER=`root`@`localhost` PROCEDURE `generar_tendencia`(IN p_nombre_columna VARCHAR(50))
BEGIN
DECLARE vlr_m DECIMAL(15,2);
DECLARE vlr_b DECIMAL(15,2);
DECLARE numreg INT;
DECLARE i INT;
DECLARE nom_tend VARCHAR(50);
SET i = 1;
SET @str = '
CREATE TEMPORARY TABLE temporal1... | true |
137a5e7922471b24115ab637ad574ddbdfaef34a | SQL | everthis/leetcode-js | /613-shortest-distance-in-a-line.sql | UTF-8 | 131 | 3.265625 | 3 | [
"MIT"
] | permissive | # Write your MySQL query statement below
select min(abs(t1.x-t2.x)) as shortest
from point as t1
join point as t2
on t1.x != t2.x;
| true |
7b3d0c0bd51b48f8c41a2c5b950f913a49071df1 | SQL | Zotova2008/1079951-yeticave-11 | /queries.sql | UTF-8 | 3,973 | 3.078125 | 3 | [] | no_license | /* Добавляем список категорий; */
INSERT INTO category
(category_name, symbol_cat)
VALUES
('Доски и лыжи', 'boards'),
('Крепления', 'attachment'),
('Ботинки', 'boots'),
('Одежда', 'clothing'),
('Инструменты', 'tools'),
('Разное', 'other');
/* Добавляем список пользователей */
INSERT INTO user_data
(user_... | true |
daf13b19e12ac89727ed3cbdb636ebca167548a2 | SQL | turnkey-commerce/gendal | /examples/booktest/cockroachdb/custom-query.xo.sql | UTF-8 | 300 | 3.25 | 3 | [
"MIT"
] | permissive | SELECT
a.author_id::integer AS author_id,
a.name::text AS author_name,
b.book_id::integer AS book_id,
b.isbn::text AS book_isbn,
b.title::text AS book_title,
b.tags::text AS book_tags
FROM books b
JOIN authors a ON a.author_id = b.author_id
WHERE b.tags LIKE '%' || %%tags string%% || '%' | true |
6d17b367b197ed4c4ec322a0f9ba510dadcd3bbf | SQL | shsm01/bkc_add.com | /bitrix/modules/security/install/db/mysql/install.sql | UTF-8 | 3,677 | 3.28125 | 3 | [] | no_license | CREATE TABLE b_sec_filter_mask
(
ID INT(11) NOT NULL auto_increment,
SORT INT(11) NOT NULL DEFAULT 10,
SITE_ID CHAR(2),
FILTER_MASK VARCHAR(250),
LIKE_MASK VARCHAR(250),
PREG_MASK VARCHAR(250),
PRIMARY KEY(ID)
);
CREATE TABLE b_sec_iprule
(
ID INT(11) NOT NULL auto_increment,
RULE_TYPE CHAR(1) N... | true |
9b53cb58a602bef1af11255cfdb04f3ab324149b | SQL | socar-jace/kotlin_practice | /docker/init/1_create_db.sql | UTF-8 | 299 | 2.671875 | 3 | [] | no_license | CREATE TABLE `member` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(32) NOT NULL,
`nickname` varchar(32) NOT NULL,
PRIMARY KEY (`id`)
);
INSERT INTO `member`
(name, nickname)
VALUES
('김도형', 'Dorma'),
('윤형중', 'Trevi'),
('조현근', 'Jace'),
('박주홍', 'Derek');
| true |
de59a720ea9f7ba7855912375b75d79fa58ce215 | SQL | brocaar/chirpstack-network-server | /internal/storage/migrations/0017_gateway_mac_to_id.up.sql | UTF-8 | 201 | 2.53125 | 3 | [
"MIT"
] | permissive | alter table gateway
rename column mac to gateway_id;
alter table gateway_stats
rename column mac to gateway_id;
alter index idx_gateway_stats_mac rename to idx_gateway_stats_gateway_id; | true |
4ee235ad2c470a8a1e15bb5211ece7709ce6fff8 | SQL | JellyBest/git | /spider/sql/mmtj.sql | UTF-8 | 1,244 | 2.9375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50710
Source Host : localhost:3306
Source Database : dadan
Target Server Type : MYSQL
Target Server Version : 50710
File Encoding : 65001
Date: 2018-07-10 22:34:38
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---... | true |
344db60e8f43403c96c3bf3174671811db4e342e | SQL | iaks23/Marketing-Analytics-Case-Study | /Problem Solutions Folder/Actor_Recs.sql | UTF-8 | 2,992 | 4.4375 | 4 | [] | no_license |
/* --------------------------
#############################
### Actor Recommendations ###
#############################
-----------------------------*/
/* ---------------------------------------------------
1. Generate total actor rental counts to use for film
popularity ranking in later steps
* `actor_film_counts`... | true |
c7951176c0369b94aa50ca782a776bb9d94c7823 | SQL | Madhu-0211/Notifier | /Notifier/WebContent/Documents/table1.sql | UTF-8 | 3,336 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 02, 2021 at 09:38 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
d204e659badaba75c2b7670c5c51a6a942a39868 | SQL | andri000me/bap_imtek | /bap_imtek.sql | UTF-8 | 5,560 | 2.84375 | 3 | [] | no_license |
-- phpMyAdmin SQL Dump
-- version 2.11.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 29, 2011 at 05:21 PM
-- Server version: 5.0.91
-- PHP Version: 5.2.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `bap_imtek`
--
-- --------------------------------------------------------
... | true |
226f7575b54e7b65de99705a961d95e05c5698e5 | SQL | MINHTECH2511/Railway22_vti_LuMinhTri | /MySQL/TESTING_4/Testing_System_Assignment_4.sql | UTF-8 | 8,305 | 4 | 4 | [] | no_license |
-- EXERCISE1 --
-- Question 1: Viết lệnh để lấy ra danh sách nhân viên và thông tin phòng ban của họ
SELECT a.fullname,
d.department_name
FROM `accounts` a
LEFT JOIN departments d
ON d.department_id=a.department_id;
-- Question 2: Viết lệnh để lấy ra thông tin các account được tạo sau ngày 20/12/2010
SE... | true |
6832204f27dbbb0d95152580ce3a84cbc5997a63 | SQL | Jaky-Maiky/Base-de-datos | /Etc/reporte_ingreso_usuarios_view.sql | UTF-8 | 194 | 2.71875 | 3 | [] | no_license | create view reporte_ingreso_usuarios_view as
select fechaRegistro, nombreUsuario, cantRegistros
from Registro, Usuario
where Registro.idRegistro = Usuario.idUsuario
order by cantRegistros desc; | true |
8c36e9109f7edaea58dab1d497da9cf5da30da06 | SQL | LewisErick/ProyObjRel | /student_trigger.sql | UTF-8 | 2,094 | 3.6875 | 4 | [] | no_license | /* -------------------------------------------------------------------------
** BEFORE INSERT ROW TRIGGER
** Initializing MemberOf.
** -------------------------------------------------------------------------*/
CREATE OR REPLACE TRIGGER student_insert
BEFORE INSERT ON student
FOR EACH ROW
BEGIN
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.